Closed james-lawrence closed 1 year ago
You mean the <![CDATA[foo]]>
block missing a <
in XML? the XML like this ![CDATA[foo]]>
? I think if CDATA
missing <
as prefix it is not correct XML document, What do you think?
@zhengchun no, the XML is correctly formatted. see the two tests. the tokens generated by the parse are different between formatted XML and unformatted XML
formatted xml the parser generates the tokens: {Type: Text, Data: "<"} {Type: Text, Data: "![CDATA[..."}
unformatted xml the parser generates the token: {Type: Text, Data: "<![CDATA[..."}
the tokenizer emits the opening < as a single character text node when XML is formatted resulting in the cdata check failing.
there might be a better fix in the tokenizer.