"Richard E. Horan" wrote:
>
> I didn't check the xml. Because currently we are thinking of using castor's
> Marshaller and Unmarshaller.
> I know for a fact the "java side" (my server) is not changing the '&' to '
> &', because I wrote the code.
There is no need to do it on the Java side of things, Castor will do it
automatically for you when you call the marshaller. The reason this
thread started was that the user was trying to create the XML by hand
and then unmarshal first. You are doing the opposite, you are letting
Castor create the XML by marshalling first, so that's why you don't see
any problems in your code.
> In an earlier version
> i made these changes for special characters but on this prototype using
> castor I haven't implemented it yet.
Castor will do it for you...
> I checked the xml and it puts in the &
>
> the Marshaller.marshal must be doing it.
Yes, the Marshaller needs to do it so that the XML is valid.
>
> code:
> cs.setLastName("HORAN & CO.");
> Marshaller.marshal(cs,csw);
> System.out.println(csw.toString());
>
> output from println:
>
> <last-name>HORAN & CO.</last-name>
>
Looks correct to me! :-)
--Keith
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev