MCPcopy Create free account
hub / github.com/BaseXdb/basex / add

Method add

basex-core/src/main/java/org/basex/query/expr/constr/Constr.java:65–80  ·  view source on GitHub ↗

Constructs child and attribute nodes. @param exprs input expressions @return self reference @throws QueryException query exception

(final Expr... exprs)

Source from the content-addressed store, hash-verified

63 * @throws QueryException query exception
64 */
65 public Constr add(final Expr... exprs) throws QueryException {
66 final NSDynContext ns = qc.ns;
67 final int size = ns.size();
68 try {
69 final QNmSet qnames = new QNmSet();
70 for(final Expr expr : exprs) {
71 more = false;
72 final Iter iter = expr.iter(qc);
73 for(Item item; (item = qc.next(iter)) != null && add(item, qnames););
74 }
75 builder.text(qc.shared.token(text.toArray()));
76 return this;
77 } finally {
78 ns.size(size);
79 }
80 }
81
82 /**
83 * Recursively adds nodes to the element arrays.

Callers 2

namespacesMethod · 0.95
addNSMethod · 0.95

Calls 15

sizeMethod · 0.95
hasURIMethod · 0.95
prefixMethod · 0.95
uriMethod · 0.95
eqMethod · 0.95
nsMethod · 0.80
iterMethod · 0.65
nextMethod · 0.65
tokenMethod · 0.65
getMethod · 0.65
kindMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected