code: private void storeAttribute(Attr attribute) {
          // examine the attributes in namespace xmlns
          if (attribute.getNamespaceURI() != null
                  && attribute.getNamespaceURI().equals(
                          XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
              // Default namespace xmlns="uri goes here"
              if (attribute.getNodeName().equals(XMLConstants.XMLNS_ATTRIBUTE)) {
                  putInCache(DEFAULT_NS, attribute.getNodeValue());
              } else {
                  // Here are the defined prefixes stored
                  putInCache(attribute.getLocalName(), attribute.getNodeValue());
              }
          }
  
      }
docs: This method looks at an attribute and stores it, if it is a namespace
  attribute.
  
  @param attribute
  to examine