Java tutorial
//package com.java2s; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static Node findChildNode(Node parent, String childName) { NodeList childNodes = parent.getChildNodes(); int childCount = childNodes.getLength(); Node child; for (int i = 0; i < childCount; i++) { child = childNodes.item(i); if (child.getNodeName().equals(childName)) { return child; } } return null; } }