code: static final String attr(Element element, String name, boolean ignoreNamespace) {
          NamedNodeMap attributes = element.getAttributes();
  
          for (int i = 0; i < attributes.getLength(); i++) {
              String localName = attributes.item(i).getNodeName();
  
              // [#103] If namespaces are ignored, consider only local
              // part of possibly namespace-unaware Element
              if (ignoreNamespace)
                  localName = stripNamespace(localName);
  
              if (name.equals(localName))
                  return attributes.item(i).getNodeValue();
          }
  
          return null;
      }
docs: Get an attribute value if it exists, or <code>null</code>