Right angle bracket not escaped after ]] in XML documents
598704Sep 18 2007 — edited Sep 19 2007If I store the character sequence ]]> in a document, the > character is not escaped when I fetch the entire document with XmlDocument.getContent(). I.e. if I call
setContent("< a > & l t ; ] ] & g t ; < / a >");
then getContent() will return:
< a > & l t ; ] ] > < / a >. (Extra space characters inserted so that it doesn't get parsed by the forum software).
The < character is escaped, but the > character is not. The XML specification requires that > is escaped in this case (see below). Apparently, the XML parser used by Sleepycat can parse this just fine, but Firefox rejects this document with a "not well formed" error.
Suggestions?
Thanks
Tilman
---
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.
---
Message was edited by:
user595701