Java tutorial
//package com.java2s; import org.w3c.dom.Element; public class Main { public static Element findChildElement(Element parent) { for (org.w3c.dom.Node node = parent.getFirstChild(); node != null; node = node.getNextSibling()) { if (node.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) { return (Element) node; } } return null; } }