private static boolean nodeNameEqualTo(Node node,String target){
  if (node == null || target == null)   return false;
  String name=node.getNodeName();
  if (target.indexOf(':') < 0) {
    int index=name.indexOf(':');
    if (index >= 0)     name=name.substring(index + 1);
  }
  return name.equals(target);
}

private static boolean nodeNameEqualTo ( Node node , String target ) { if ( node == null || target == null ) return false ; String name = node . getNodeName ( ) ; if ( target . indexOf ( ':' ) < 0 ) { int index = name . indexOf ( ':' ) ; if ( index >= 0 ) name = name . substring ( index + 1 ) ; } return name . equals ( target ) ; }
check whether a name of given node is equal to a given name . strips namespace ( if any ) . case - sensitive .
