Here you can find the source of isValidNode(Node node, String name)
public static boolean isValidNode(Node node, String name)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; public class Main { public static boolean isValidNode(Node node) { return !node.getNodeName().equals("#text"); }/* w w w. j av a 2 s . co m*/ public static boolean isValidNode(Node node, String name) { return node.getNodeName().equals(name); } }