Fix a parsing issue with attribute values and throw a XmlError instead of a RangeError