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

Method name

basex-core/src/main/java/org/basex/data/Data.java:400–407  ·  view source on GitHub ↗

Returns the name of an element, attribute or processing instruction. @param pre PRE value @param kind node kind @return name

(final int pre, final int kind)

Source from the content-addressed store, hash-verified

398 * @return name
399 */
400 public final byte[] name(final int pre, final int kind) {
401 if(kind == PI) {
402 final byte[] name = text(pre, true);
403 final int i = indexOf(name, ' ');
404 return i == -1 ? name : substring(name, 0, i);
405 }
406 return (kind == ELEM ? elemNames : attrNames).key(nameId(pre));
407 }
408
409 /**
410 * Returns the ID of the namespace URI of the addressed element or attribute.

Callers 15

insertElementAsOnly1Method · 0.95
insertElementAsOnly2Method · 0.95
insertElementAsOnly3Method · 0.95
updateElementNameMethod · 0.95
simpleNodeDeleteMethod · 0.95
cascadingDeleteMethod · 0.95
cascadingDelete2Method · 0.95
deleteAttributeMethod · 0.95
updateAttributeMethod · 0.95

Calls 5

textMethod · 0.95
nameIdMethod · 0.95
indexOfMethod · 0.45
substringMethod · 0.45
keyMethod · 0.45

Tested by 13

insertElementAsOnly1Method · 0.76
insertElementAsOnly2Method · 0.76
insertElementAsOnly3Method · 0.76
updateElementNameMethod · 0.76
simpleNodeDeleteMethod · 0.76
cascadingDeleteMethod · 0.76
cascadingDelete2Method · 0.76
deleteAttributeMethod · 0.76
updateAttributeMethod · 0.76