I would like to be able marshall and unmarshall the following XML:
<cristalquery name="TestQuery" version="0">
<query language="existdb:xquery"><![CDATA[
<TRList>{
for $prop in collection('weighbridge')/Property[@name='Type']
where $prop = "Weighbridge"
return local:queryTransaction(util:collection-name($prop))
}</TRList>
]]></query>
</cristalquery>
As you can see it contains an XQuery, and to store that unescaped I am need to use CDATA. Currently I am planning to implemenet a custom FieldHandler, but I think it would be great if castor could support CDATA with a mapping like bellow, i.e. uses node="cdata" in the last field:
I would like to be able marshall and unmarshall the following XML:
As you can see it contains an XQuery, and to store that unescaped I am need to use CDATA. Currently I am planning to implemenet a custom FieldHandler, but I think it would be great if castor could support CDATA with a mapping like bellow, i.e. uses
node="cdata"
in the last field:org.w3c.dom.CDATASection is a subclass of Text, so it should not be hard to handle the ![CDATA...]] wrapper around that text.