Java tutorial
//package com.java2s; import org.w3c.dom.Node; public class Main { /** * Checks if the name of a node matches with a given string * * @param n node whose name has to be checked * @param name supposed name for the node * @return {@literal true} if the name of the node matches the name passed * as a parameter */ public static boolean isNodeName(Node n, String name) { return n.getNodeName().compareTo(name) == 0; } }