Here you can find the source of isElementNodeOfType(final Node n, final String type)
Parameter | Description |
---|---|
n | node |
type | type |
public static boolean isElementNodeOfType(final Node n, final String type)
//package com.java2s; /* License as published by the Free Software Foundation; either */ import org.w3c.dom.Node; public class Main { /**/*from ww w . j av a2 s.c om*/ * @param n node * @param type type * @return whether node is of type */ public static boolean isElementNodeOfType(final Node n, final String type) { return n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(type); } }