Java XML Child Node Get getChildNode(Node node, String name)

Here you can find the source of getChildNode(Node node, String name)

Description

get Child Node

License

Open Source License

Declaration

private static Node getChildNode(Node node, String name) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Node;

public class Main {
    private static Node getChildNode(Node node, String name) {
        for (int i = 0; i < node.getChildNodes().getLength(); i++) {
            String nodeName = node.getChildNodes().item(i).getNodeName();

            if (nodeName.endsWith(name))
                return node.getChildNodes().item(i);
        }//  w  ww. jav a  2 s  .  c o m
        return null;
    }
}

Related

  1. getChildNode(Node n, String name)
  2. getChildNode(Node n, String name)
  3. getChildNode(Node node, int index)
  4. getChildNode(Node node, String childName)
  5. getChildNode(Node node, String name)
  6. getChildNode(Node node, String name)
  7. getChildNode(Node node, String nodeName)
  8. getChildNode(Node node, String tag)
  9. getChildNode(Node parent, String childName)