Java tutorial
//package com.java2s; import org.w3c.dom.Node; public class Main { private static String getTextContent(Node n) { return n == null ? "" : n.getTextContent(); } }