Here you can find the source of getStringValue(Element from)
public static String getStringValue(Element from)
//package com.java2s; import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class Main { public static String getStringValue(Element from) { String value = from.getFirstChild().getNodeValue(); return value; }/*from ww w .j av a 2 s. c o m*/ public static String getStringValue(Element from, String elementName) { String value = null; NodeList nodes = from.getElementsByTagName(elementName); if (nodes != null && nodes.getLength() > 0) { value = nodes.item(0).getChildNodes().item(0).getNodeValue(); } return value; } }