powered by Jive Software

org.jivesoftware.util.XMLProperties getAttributes

I’m having trouble understanding the documentation for this method

/**
* Returns the value of the attribute of the given property name or null
* if it doesn’t exist. Note, this
*
* @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 null if
* it doesn’t exist.
*/
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 heirarchy.
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);
}
return null;
}

Can anyone explain what “Note, this” is supposed to indicate? Is this just a typo?