Hi Tim,

Which version of Xerces (and the Apache serializer) are you using?

Arnaud

> -----Original Message-----
> From: Kuntz, Tim [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 1:29 AM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] XML marshal and unmarshal of entities
> 
> 
>       I am having a problem with the entities &, <, and > during the
> marshal process. They are not being escaped to &amp;, &lt; and &gt;.
The
> unmarshal of the same entities _is_ being handled correctly. I'm sure
there
> is a simple property setting that I am missing and was hoping someone
could
> point me in the right direction.
> 
>       Sample code...
> 
>       // xml element... <description>Smith &amp;
> Wesson&lt;br&gt;</description>
>       StringReader sr = new StringReader( xml );
>       MyClass myClass = MyClass.unmarshal( sr );
> 
>       System.out.println(myClass.getDescription());
> 
>       // prints Smith & Wession<br>
> 
>       java.io.StringWriter sw = new StringWriter();
>       org.exolab.castor.xml.Marshaller.marshal( myClass, sw );
> 
>       System.out.println( sw.toString() );
> 
>       // prints       <description>Smith & Wesson<br></description>
>       // should be    <description>Smith &amp;
> Wesson&lt;br&gt;</description>
> 
> thanks,
> Tim Kuntz
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to