Checks for duplicates of a given attribute in an XML file