public static boolean nameEqual(Node node,String name,boolean caseSensitive){
  if (name == null)   return false;
  if (caseSensitive) {
    return name.equals(node.getNodeName()) || name.equals(node.getLocalName());
  }
  return name.equalsIgnoreCase(node.getNodeName()) || name.equalsIgnoreCase(node.getLocalName());
}

public static boolean nameEqual ( Node node , String name , boolean caseSensitive ) { if ( name == null ) return false ; if ( caseSensitive ) { return name . equals ( node . getNodeName ( ) ) || name . equals ( node . getLocalName ( ) ) ; } return name . equalsIgnoreCase ( node . getNodeName ( ) ) || name . equalsIgnoreCase ( node . getLocalName ( ) ) ; }
check if given name is equal to name of the element ( with and without namespace )
