Here you can find the source of isIgnorable(Node n)
static public boolean isIgnorable(Node n)
//package com.java2s; import org.w3c.dom.Node; public class Main { /** Can this node be just ignored? Empty text nodes can. *//* ww w. j a v a2 s. c o m*/ static public boolean isIgnorable(Node n) { int type = n.getNodeType(); String val = n.getNodeValue(); return (type == Node.TEXT_NODE && val.trim().length() == 0) || (type == Node.COMMENT_NODE); } }