Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

problem with CDATA

843834Feb 4 2003 — edited Feb 4 2003
I'm trying to create a CDATA node containing text that includes a square bracket. Example:

CDATASection cdata = (CDATASection)doc.createCDATASection("blah]");

The bracket is not included in the XML. The result looks like

<![CDATA[blah]]>

(missing one bracket at the end). Furthermore, if I add extra content like this

CDATASection cdata = (CDATASection)doc.createCDATASection("blah]morestuff");

I get the same result:

<![CDATA[blah]]>

It seems that the bracket and everything after it gets ignored.

Any suggestions?

Thanks,
vlb1
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2003
Added on Feb 4 2003
3 comments
141 views