The list of methods to do XML Node Name are organized into topic(s).
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;
...
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);
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) {
...