public static String getAttrValue(String localName, Attributes atts) {
        for (int i = 0; i < atts.getLength(); i++) {
            if (localName.equals(atts.getLocalName(i))) {
                return atts.getValue(i);
            }
        }
        return null;
    }
@param localName
@param atts
@return attribute value with that local name or <code>null</code> if not found
tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java