node-xml
node-xml copied to clipboard
Greater-than symbol in attribute values
Given the input:
<e a=">">></e>
the parser says the attribute's value is > but the text content is ">". Similarly if the attribute value is ' it is not decoded. So attribute values are passed through without decoding, unlike text content.
Given the input:
<e a=">">></e>
the parser says the same as before (this is correct, as encoding greater-than is optional except in the pattern ]]>.)
But given the input:
<e a=">"></e>
The parser gives the error: "Attribute: values are required and must be in quotes".
It seems this should be allowed in XML, and is allowed in most parsers: http://stackoverflow.com/questions/5665967/xml-parsing-curiosity-greater-than-in-attribute