Bugs item #1432251, was opened at 2006-02-15 16:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1432251&group_id=16035

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Vincent Cautaerts (cipherbrain)
Assigned to: Nobody/Anonymous (nobody)
Summary: Dom4j generates invalid XML code in CDATA sections...

Initial Comment:
Hi,

Maybe I'm expecting too much from Dom4j, but this code
generates invalid XML code:

Document document=DocumentHelper.createDocument();
Element root = document.addElement( "root" );
Element author1 = root.addElement( "test" )
     .addCDATA( "Some ]]> Text" );
System.out.println(document.asXML());



Output given:

<?xml version="1.0" encoding="UTF-8"?>
<root><test><![CDATA[Some ]]> Text]]></test></root>



I would have expected, at least, an error when adding
the CDATA, or some kind of escaping to avoid the wrong
output.


Thanks anyway for the great soft!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1432251&group_id=16035


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to