Here you can find the source of getNodeValue(Node n)
public static String getNodeValue(Node n)
//package com.java2s; //License from project: BSD License import org.w3c.dom.Node; public class Main { public static String getNodeValue(Node n) { if (n == null) return null; return n.getTextContent(); }// w w w. j ava2 s .c om }