Here you can find the source of isElement(final Node n)
public static boolean isElement(final Node n)
//package com.java2s; //License from project: LGPL import org.w3c.dom.Element; import org.w3c.dom.Node; public class Main { public static boolean isElement(final Node n) { return n instanceof Element; }// ww w. j av a 2 s . co m }