Here you can find the source of getNodeTextContent(Node node, String node_name)
public static String getNodeTextContent(Node node, String node_name)
//package com.java2s; //License from project: LGPL import org.w3c.dom.*; public class Main { public static String getNodeTextContent(Node node, String node_name) { return getNodeTextContent(node, node_name, ""); }//w w w .j ava2 s .c o m public static String getNodeTextContent(Node node, String node_name, String def) { if (node == null || node_name == null) return def; String text = node.getTextContent(); return text != null ? text : def; } }