Here you can find the source of getNodeType(Node node)
private static short getNodeType(Node node)
//package com.java2s; import org.w3c.dom.*; public class Main { private static short getNodeType(Node node) { return (node != null ? node.getNodeType() : -1); }//from w ww . j a va 2s .co m }