Here you can find the source of getText(Node node)
public static String getText(Node node)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; public class Main { public static String getText(Node node) { if (node == null) { return null; }//w ww .ja va2 s .com return node.getTextContent(); } }