question: 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 ) ; }
target:  Check whether a name of given node is equal to a given name. Strips namespace (if any). Case-sensitive.