Here you can find the source of getStringValue(String tag, Element element)
public static String getStringValue(String tag, Element element)
//package com.java2s; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static String getStringValue(String tag, Element element) { NodeList nodes = element.getElementsByTagName(tag).item(0) .getChildNodes();// ww w .j av a 2s . com Node node = (Node) nodes.item(0); return node.getNodeValue(); } }