Mircea Mihai Carasel wrote: > Hi, > > Working on http://track.sipfoundry.org/browse/XX-6950 I noticed that > during XStream serialization '&' character is transformed into & > (HTML uses the same symbols to display '&' character) In my chase when > gravatar url is written into XML & character is replaced with & > > However during deserialization XStream puts in the created Java object > the correct character: & > > Since deserialization works fine, I don't know if this is a XStream bug > or not. > Anyway I was thinking that is a good think to share this finding with > the dev-list :) >
It's a feature not a bug ;-) Escaping ampersand is exactly what XStream has to do: http://www.w3.org/TR/xml/#syntax If you use XStream, dom4l or any other XML aware serialization it happens automatically. However if you use Velocity template to write out XML it needs to be done by calling some kind of Escape method on any string that can contain character invalid in XML ('&', '<', '>' etc.) D. _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
