if (nodeNames != null && !acceptName(n.getLocalName()))
String localName = n.getLocalName(); if (localName == null) { localName = n.getNodeName(); } if (nodeNames != null && !acceptName(localName))
  public short acceptNode(Node n)  {    if (n.getNodeType() != Node.ELEMENT_NODE)      {        return NodeFilter.FILTER_SKIP;      }    if (nodeNames != null && !acceptName(n.getLocalName()))      {        return NodeFilter.FILTER_SKIP;      }    if (attributeNames != null && !acceptAttributes(n.getAttributes()))      {        return NodeFilter.FILTER_SKIP;      }    return NodeFilter.FILTER_ACCEPT;  }