public String getAttribute(String name, String attribute) {
        if (name == null || attribute == null) {
            return null;
        }
        String[] propName = parsePropertyName(name);
        // Search for this property by traversing down the XML hierarchy.
        final Lock readLock = readWriteLock.readLock();
        readLock.lock();
        try {
            Element element = document.getRootElement();
            for (String child : propName) {
                element = element.element(child);
                if (element == null) {
                    // This node doesn't match this part of the property name which
                    // indicates this property doesn't exist so return empty array.
                    break;
                }
            }
            if (element != null) {
                // Get its attribute values
                return element.attributeValue(attribute);
            }
        } finally {
            readLock.unlock();
        }
        return null;
    }
Returns the value of the attribute of the given property name or {@code null}
if it doesn't exist.

@param name the property name to lookup - ie, "foo.bar"
@param attribute the name of the attribute, ie "id"
@return the value of the attribute of the given property or {@code null} if
     it doesn't exist.
xmppserver/src/main/java/org/jivesoftware/util/XMLProperties.java