Here you can find the source of getChildElement(Node element, String childNodeName)
public static Node getChildElement(Node element, String childNodeName)
//package com.java2s; import org.w3c.dom.Node; public class Main { public static Node getChildElement(Node element, String childNodeName) { for (int i = 0; i < element.getChildNodes().getLength(); i++) { Node child = element.getChildNodes().item(i); if (child.getNodeName().equals(childNodeName)) { return child; }//from w w w. ja v a2s .c om } return null; } }