Here you can find the source of getStringValue(Element ele, String tagName)
private static String getStringValue(Element ele, String tagName)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class Main { private static String getStringValue(Element ele, String tagName) { String value = null;/*from w w w .j a v a 2s .c o m*/ NodeList nl = ele.getElementsByTagName(tagName); if (nl != null && nl.getLength() > 0) { Element el = (Element) nl.item(0); value = el.getFirstChild().getNodeValue(); } return value; } }