List of utility methods to do XML Node Name
ArrayList | getAllNodes(Node node, String[] nodeNamesArray) get All Nodes ArrayList nodeList = new ArrayList(); findAllNodes(node, nodeNamesArray, nodeList); return nodeList; |
Node | getBeanElement(Node elem, String nodeName) get Bean Element if (!nodeName.equals(elem.getLocalName()) && !elem.getOwnerDocument().equals(elem.getParentNode())) { return getBeanElement(elem.getParentNode(), nodeName); } else { return elem; |
Node | getDescendent(Node node, String nodeName) get Descendent NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child.getNodeName().equals(nodeName)) { return child; return null; ... |
int | getIntegerNodeValue(Node node, String nodeName) get Integer Node Value return Integer.parseInt(getStringNodeValue(node, nodeName));
|
String | getName(Node node) Gets the local (sans namespace) name of the given node. String name = node.getNodeName(); int colon = name.lastIndexOf(":"); return colon < 0 ? name : name.substring(colon + 1); |
String | getName(Node node) get Name return node.getNodeName();
|
String | getName(Node node) get Name return node.getNodeName();
|
Node | getNode(final Node iNode, final String iNodeName) This method returns the desired node which is determined by the provided node name and namespace. Node result = null; if (iNode != null) { NodeList children = iNode.getChildNodes(); if (children != null) { for (int i = 0; i < children.getLength(); i++) { Node currentChild = children.item(i); String currentChildName = currentChild.getLocalName(); if (currentChildName != null) { ... |
Node | getNode(Node iNode, String iNodeName) This method returns the desired node which is determined by the provided node name and namespace. Logger.getLogger("org.adl.util.debug.samplerte").entering("DOMTreeUtility", "getNode()"); Logger.getLogger("org.adl.util.debug.samplerte").info("Parent Node: " + iNode.getLocalName()); Logger.getLogger("org.adl.util.debug.samplerte").info("Node being searched for: " + iNodeName); Node result = null; if (iNode != null) { NodeList children = iNode.getChildNodes(); if (children != null) { for (int i = 0; i < children.getLength(); i++) { ... |
Node | getNode(Node iNode, String iNodeName) This method returns the desired node which is determined by the provided node name and namespace. Node result = null; if (iNode != null) { NodeList children = iNode.getChildNodes(); if (children != null) { for (int i = 0; i < children.getLength(); i++) { Node currentChild = children.item(i); String currentChildName = currentChild.getLocalName(); if (currentChildName != null) { ... |