Here you can find the source of getSubElement(Element element, String subTagName)
public static String getSubElement(Element element, String subTagName)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { public static String getSubElement(Element element, String subTagName, int itemId) { return element.getElementsByTagName(subTagName).item(itemId).getTextContent(); }/*from w w w . j a va 2s .c om*/ public static String getSubElement(Element element, String subTagName) { return getSubElement(element, subTagName, 0); } }