Java XML Node to Element isElement(Node node)

Here you can find the source of isElement(Node node)

Description

Returns whether the specified node is an element

License

Open Source License

Parameter

Parameter Description
node to test

Return

true if the specified node is an element; false otherwise

Declaration

public static boolean isElement(Node node) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Node;

public class Main {
    /**/*from   w  w  w  .j av a2 s.  c om*/
     * Returns whether the specified node is an element
     *
     * @param node to test
     * @return true if the specified node is an element; false otherwise
     */
    public static boolean isElement(Node node) {
        return node.getNodeType() == Node.ELEMENT_NODE;
    }
}

Related

  1. isElement(final Node n)
  2. isElement(Node e)
  3. isElement(Node node)
  4. isElement(Node node)
  5. isElement(Node node)
  6. isElement(Node node)
  7. isElement(Node node, String name)
  8. isElementByTag(Node node, String tagName)
  9. isElementContent(Node node)