I have a Java class with a String attribute holding a chunk of html. I use Castor to marshall it to xml and xslt to create html pages including the chunk of html amongst other things.
Justifiably, Castor will output escape it (turn the < symbols into lt;'s, etc.). So when I use xslt to select the contents of the tag into my new html page it will just be text and not html tags as it has already been output escaped.
I can configure Castor to put a CDATA around the field contents, but not to disable output escaping. Is it possible to set disable-output-escaping anywhere during marshalling?
I've got round it by holding the chunk of html as a byte but this is not really ideal. How do people generally marshall/unmarshall data with tags in? I don't really want to have to parse the html...it might not be fully formed.