Here you can find the source of getFirstChildElement(Element parent)
public static Element getFirstChildElement(Element parent)
//package com.java2s; // Metawidget (licensed under LGPL) import org.w3c.dom.Element; import org.w3c.dom.Node; public class Main { /**/*w ww .j a v a 2s . c om*/ * Get the indexed Element. * <p> * Similar to <code>Element.getChildNodes.item</code>, but ignores any Nodes (such as * indentation TextNodes). */ public static Element getFirstChildElement(Element parent) { Node node = parent.getFirstChild(); while (node != null && !(node instanceof Element)) { node = node.getNextSibling(); } return (Element) node; } }