Here you can find the source of isElementNode(final Node target)
target
's getNodeType()
method returns Node.ELEMENT_NODE
.
public static boolean isElementNode(final Node target)
//package com.java2s; /*//w w w . j a va 2 s . co m * The contents of this file are subject to the GNU Lesser General Public * License Version 2.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.gnu.org/copyleft/lesser.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Developer: * Todd Ditchendorf, todd@ditchnet.org * */ import org.w3c.dom.*; public class Main { /** * Tests to see if <code>target</code>'s <code>getNodeType()</code> * method returns <code>Node.ELEMENT_NODE</code>. * */ public static boolean isElementNode(final Node target) { return Node.ELEMENT_NODE == target.getNodeType(); } }