Here you can find the source of getFirstChildElement(Element parent, String childName)
public static Element getFirstChildElement(Element parent, String childName)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Element; public class Main { public static Element getFirstChildElement(Element parent, String childName) { if (parent.getElementsByTagName(childName).getLength() > 0) { return (Element) parent.getElementsByTagName(childName).item(0); }// w ww. j a v a 2s. c om return null; } }