Here you can find the source of getNodeValue(org.w3c.dom.Node node)
public static String getNodeValue(org.w3c.dom.Node node)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; public class Main { public static String getNodeValue(org.w3c.dom.Node node) { for (int i = 0; i < node.getChildNodes().getLength(); i++) { if (node.getChildNodes().item(i).getNodeType() == Node.TEXT_NODE) return node.getChildNodes().item(i).getNodeValue(); }/*from ww w . ja v a 2 s . c o m*/ return ""; } }