Here you can find the source of findFirstChildElement(Element parent)
public static Element findFirstChildElement(Element parent)
//package com.java2s; import org.w3c.dom.Element; public class Main { public static Element findFirstChildElement(Element parent) { org.w3c.dom.Node ret = parent.getFirstChild(); while (ret != null && (!(ret instanceof Element))) { ret = ret.getNextSibling();//from www . j a va 2s . c o m } return (Element) ret; } }