You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/04/25 22:50:35 UTC
DO NOT REPLY [Bug 19266] -
String with 'CDATA' text serialized/deserialized with error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19266>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19266
String with 'CDATA' text serialized/deserialized with error
------- Additional Comments From mrglavas@ece.uwaterloo.ca 2003-04-25 20:50 -------
Hi Serg,
I'm not familiar with castor, but from a quick glance at your code, it seems
that the problem is the value you gave to cdata.text. "<![CDATA[<a
href="http://baikal.askmore.info">Prebaikalsky National Park</a>]]
>" isn't a CDATA section. The parser will interpret it as character data, and
then correctly report the error that "]]>" cannot appear in content, unless it
actually ends a CDATA section. CDATA section's must start with the literal "<!
[CDATA[" (i.e. no entity, or char references). If you replace the value of
cdata.text with "<![CDATA[[<a href="http://baikal.askmore.info">Prebaikalsky
National Park</a>]]>", you should probably achieve what you wanted.
See: http://www.w3.org/TR/REC-xml#NT-CDSect
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org