A custom field handler won't work as Marc has found out the serializer will encode the '<'. The serializer believes that you are trying to output a string value of "<![CDATA[...]]>" and that you'll want that same string value to be read back in exactly during xml parsing, so it encodes the characters so that an XML parser won't get confused into thinking the '<' is the start of an element or CDATA section.

The only way around this is to use your own serializer or to configure the Xerces one as suggested in Stephen's post.

--Keith

Bruce Snyder wrote:
On 3/21/06, Marc Respass <[EMAIL PROTECTED]> wrote:

Stephen,

Thank you. I'll give it a try. It looks surprisingly similar to the
GeneralizedFieldHandler that I wrote. I have this method

public Object convertUponGet(Object value) {
       value = "<![CDATA[" + value + "]]>";
       return value;
}

but the first "<" gets escaped as &lt;


Marc,

I was just going to suggest writing a custom field handler as a
solution. See the following for more info:

http://www.castor.org/xml-fieldhandlers.html

Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo (http://geronimo.apache.org/)

Castor (http://castor.org/)

-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to