Here you can find the source of getChildNodeByName(Node node, String childName)
public static Node getChildNodeByName(Node node, String childName)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static Node getChildNodeByName(Node node, String childName) { NodeList children = node.getChildNodes(); for (int j = 0; j < children.getLength(); j++) { Node child = children.item(j); if (child.getNodeName().equals(childName)) { return child; }// w w w . ja v a 2s .co m } return null; } }