xmlquery icon indicating copy to clipboard operation
xmlquery copied to clipboard

cdata with formatted xml

Open james-lawrence opened this issue 3 years ago • 3 comments

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.

james-lawrence avatar Apr 07 '21 13:04 james-lawrence

Coverage Status

Coverage increased (+0.04%) to 92.569% when pulling 7c5d18be10d773500f3c138eb0dcb015c06ed4c7 on james-lawrence:enh/cdata-output into e73954f0f504eaf97f73ad62a4c52419e304b7bd on antchfx:master.

coveralls avatar Apr 07 '21 13:04 coveralls

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 avatar Apr 08 '21 11:04 zhengchun

@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[..."}

james-lawrence avatar Apr 08 '21 11:04 james-lawrence