Here you can find the source of getElementText(Element namedElement)
public static String getElementText(Element namedElement)
//package com.java2s; // Released under the terms of the CPL Common Public License version 1.0. import org.w3c.dom.*; public class Main { public static String getElementText(Element namedElement) { if (namedElement == null) { return null; }/*from www. java 2s .c om*/ String text = namedElement.getTextContent(); return (text.isEmpty()) ? null : text; } }