Here you can find the source of getChildElement(Node parent, String elementName)
public static Node getChildElement(Node parent, String elementName)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static Node getChildElement(Node parent, String elementName) { NodeList childNodes = parent.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node childNode = childNodes.item(i); if (elementName.equals(childNode.getNodeName())) return childNode; }//ww w . j a va 2s. c o m return null; } }