List of utility methods to do XML Node Attribute Get
String | getNodeAttribute(Node node, String name) get Node Attribute return getNamedItemNodeValue(node.getAttributes(), name, null);
|
String | getNodeAttribute(Node node, String name, String def) get Node Attribute return getNamedItemNodeValue(node.getAttributes(), name, def);
|
boolean | nodeMatchesAttributeFilter(Node node, String attributeName, List node Matches Attribute Filter if (attributeName == null || attributeValues == null) { return true; NamedNodeMap attrMap = node.getAttributes(); if (attrMap != null) { Node attrNode = attrMap.getNamedItem(attributeName); if (attrNode != null && attributeValues.contains(attrNode.getNodeValue())) { ... |
Element | findNextElementWithAttribute(Node ret, String name, String attribute, String value) find Next Element With Attribute ret = ret.getNextSibling(); while (ret != null && (!(ret instanceof Element) || !ret.getNodeName().equals(name) || ((Element) ret).getAttribute(attribute) == null || !((Element) ret) .getAttribute(attribute).equals(value))) { ret = ret.getNextSibling(); return (Element) ret; |