Here you can find the source of getFirstChildElementNode(Node node)
public static Node getFirstChildElementNode(Node node)
//package com.java2s; /*/*ww w . j a va 2 s.c o m*/ * The following methods come from a library written by Tom Fennelly. * Here was the header of the licence. */ import org.w3c.dom.*; public class Main { public static Node getFirstChildElementNode(Node node) { if (node == null) return (null); NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (Node.ELEMENT_NODE == child.getNodeType()) return (child); } return (null); } }