Java tutorial
//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); String nodeName = childNode.getLocalName(); if (elementName.equals(nodeName)) { return childNode; } } return null; } }