Here you can find the source of getChildElement(Node node)
static public Element getChildElement(Node node)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NodeList; import org.w3c.dom.Node; import org.w3c.dom.Element; public class Main { static public Element getChildElement(Node node) { NodeList nl = node.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node n = nl.item(i);//from ww w . j a va 2s .co m if (n.getNodeType() == Node.ELEMENT_NODE) { return (Element) n; } } return null; } }