List of utility methods to do XML Attribute Get
String | getAttribute(final Node xml, final String namespaceURI, final String localName) Retrieves the desired attribute from the given Node return xml == null ? null : xmlFindTextNode(xml.getAttributes().getNamedItemNS(namespaceURI, localName));
|
String | getAttribute(NamedNodeMap map, String name) Get a named value from the NamedNodeMap. String value = ""; try { Node node = map.getNamedItem(name); if (node != null) { value = node.getNodeValue().trim(); } catch (Exception e) { return value; |
String | getAttribute(NamedNodeMap namedNodeMap, String name) get Attribute Node node = namedNodeMap.getNamedItem(name); if (node == null) { return null; return node.getNodeValue(); |
String | getAttribute(NamedNodeMap ruleAttributes, String attributeName) Get an attribute by name Node miringRuleNode = ruleAttributes.getNamedItem(attributeName);
String miringRule = miringRuleNode != null ? miringRuleNode.getNodeValue() : null;
return miringRule;
|
String | getAttribute(Node aNode, String attributeName) Returns the value of the named attribute from the given XML node or null if no such attribute exists.
NamedNodeMap attributes = aNode.getAttributes(); if (attributes == null) return null; Node n = attributes.getNamedItem(attributeName); if (n == null) return null; return n.getNodeValue(); |
String | getAttribute(Node attrNode) get Attribute StringBuffer value = new StringBuffer(); if (attrNode != null && attrNode.getChildNodes().getLength() > 0) { int childCount = attrNode.getChildNodes().getLength(); for (int i = 0; i < childCount; i++) { value.append(attrNode.getChildNodes().item(i).getNodeValue()); return value.toString().trim(); ... |
String | getAttribute(Node currentNode, String attributeName) Gets the attribute value for a Node given the attribute name NamedNodeMap attrs = currentNode.getAttributes();
return attrs.getNamedItem(attributeName).getNodeValue().trim();
|
String | getAttribute(Node element, String attName) get Attribute NamedNodeMap attrs = element.getAttributes(); if (attrs == null) return null; Node attN = attrs.getNamedItem(attName); if (attN == null) return null; return attN.getNodeValue(); |
String | getAttribute(Node element, String name, String dflt) Get the given name-d attribute from the given element. if (element == null) { return dflt; return getAttribute(element.getAttributes(), name, dflt); |
Attr | getAttribute(Node iNode, String iAttributeName) This method returns the attribute of the given node whose name matches the named value (iAttributeName) and a particular namespace (iNamespaceForAttr). Logger.getLogger("org.adl.util.debug.validator").entering("DOMTreeUtility", "getAttribute()"); Logger.getLogger("org.adl.util.debug.validator").info("Parent Node: " + iNode.getLocalName()); Logger.getLogger("org.adl.util.debug.validator").info("Node being searched for: " + iAttributeName); Attr result = null; if (iNode != null) { NamedNodeMap attrList = iNode.getAttributes(); int numAttr = attrList.getLength(); Attr currentAttrNode = null; ... |