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

Method attribute

basex-core/src/main/java/org/basex/util/XMLAccess.java:58–64  ·  view source on GitHub ↗

Returns the value of the requested attribute, or an error. @param node node @param name attribute name @param info element info @return value @throws BaseXException database exception

(final XNode node, final QNm name, final String info)

Source from the content-addressed store, hash-verified

56 * @throws BaseXException database exception
57 */
58 public static byte[] attribute(final XNode node, final QNm name, final String info)
59 throws BaseXException {
60
61 final byte[] value = node.attribute(name);
62 if(value != null) return value;
63 throw new BaseXException("%: Missing \"%\" attribute.", info, name);
64 }
65
66 /**
67 * Returns an enum instance for the requested attribute.

Callers 1

UserMethod · 0.45

Calls 1

valueMethod · 0.95

Tested by

no test coverage detected