List of utility methods to do XML Attribute from Node
Properties | parseAttributes(Node node) parse Attributes Properties attributes = new Properties(); NamedNodeMap attributeNodes = node.getAttributes(); for (int i = 0; i < attributeNodes.getLength(); i++) { Node attribute = attributeNodes.item(i); attributes.put(attribute.getNodeName(), attribute.getNodeValue()); return attributes; |
Set | parseAttributesTag(Node n) This method parse an Attributes tag, DTD for Attribute is as follows. NodeList attributes = n.getChildNodes(); final int numAttributes = attributes.getLength(); if (numAttributes == 0) { return null; Set set = new HashSet(); for (int l = 0; l < numAttributes; l++) { Node attr = attributes.item(l); ... |
String | xmlGetAttribute(Node node, String attrname) Reads an attribut from a DOM Node. String theValue = null; if (node == null) return null; NamedNodeMap attrs = node.getAttributes(); if (attrs != null) { Node attr = attrs.getNamedItem(attrname); if (attr != null) { return attr.getNodeValue(); ... |
void | xmlGetAttribute2(Node node, String attrname) xml Get Attribute NamedNodeMap attrs = node.getAttributes(); if (attrs != null) { for (int i = 0; i < attrs.getLength(); i++) { Node attr = attrs.item(i); |