Error parsing document containing '>'
I have a small document like this:
<?xml version="1.0" encoding="utf-8"?>
<entry>
f --> g
</entry>
Parsing it with xml-light yields: Xml node expected line 3 character 7
xmllint command line utility shows it as well formed. AFAIK, '>' is allowed in this context (although perhaps > might be preferable).
As for xmllint:
$ xmllint test-xml.xml
<?xml version="1.0" encoding="utf-8"?>
<entry>
f --> g
</entry>
xmllint seems to correct ">" to the reference ">"
As for ">" in xml generally: The right angle bracket (>) may be represented using the string " > ", and must, for compatibility, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section. ( https://www.w3.org/TR/2008/REC-xml-20081126/#syntax )
Which also seems to explain the behaviour of xmllint.