This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
How can I use JAXB to create an XML message that contains a CDATA tag? I want to create an XML message that looks like this:
<thisTag><![CDATA[ 123 456 789 321 ]]></thisTag>
But I can't figure out how to get "CDATA" to appear in the message.
IBM 286, SCJP, SCWCD, EIEIO
Joined: Dec 17, 2002
I tried to force the CDATA tag by prepending the string "<!CDATA[[" to the contents of my data. But JAXB translated it to "& l t ; !CDATA[[". Does anybody know how to tell JAXB not to convert "<" to "& l t ;"? [ December 29, 2004: Message edited by: Rick Portugal ]