Support Requests item #2014056, was opened at 2008-07-09 10:25
Message generated for change (Comment added) made by filipjirsak
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=216035&aid=2014056&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
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: add Text without escaping or addid cdata section!!?

Initial Comment:
Hi,

I want to add a String as text/content to an Element. If I use the addText() 
method my String gets escaped, so "<p>...</p>" becomes something like this 
"&lt;p%gt;..".

Oh fine, I have to use addCDATA() method ... no I don't because this would make 
something like "<![CDATA[...myText...]]>".

I just want to add my String as body-content to an element wihout changing the 
string in whatever way. Is this possible??

using dom4j.1.6.1

regards, chris

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

Comment By: Filip Jirsk (filipjirsak)
Date: 2008-07-09 10:53

Message:
Logged In: YES 
user_id=1175071
Originator: NO

No, it is not possible. In XML, you cannot have unquoted angle brackets or
ampersand in text content. You can parse a String into XML (try
DocumentHelper.parseText() method) and append it as XML nodes in case you
want insert it as XML content, not text content.

Regards,

Filip

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

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

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to