When specifying an attribute name, "name", for example,
if a nested XML element does not have a "name"
attribute, attempting to compare this XML document will
result in a NPE.
The method areAttributesComparable() needs to check if
qualifyingAttributes[i] is null prior to the line
nsURI = qualifyingAttributes[i].getNamespaceURI();
or some other means to verify that the attribute is
present in order to make the above call.
Log in to post a comment.