Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Right angle bracket not escaped after ]] in XML documents

598704Sep 18 2007 — edited Sep 19 2007
If 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2007
Added on Sep 18 2007
7 comments
1,557 views