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)
| 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. |