[xsd-users] How to serialize character reference i.e. 

Boris Kolpackov boris at codesynthesis.com
Tue Apr 19 10:36:00 EDT 2011


Hi Jack,

Jack Reese <jackson.reese at gmail.com> writes:

> When serializing a string that contains "*foo &#**xD; bar*" the resulting
> string in the generated XML is converted to "*foo &amp;#xD; bar*" (the "*
> amp;*" is added following the "*&*" - as if the "*&#**xD;*" character
> reference was not recognized.

You need to use the actual character value in UTF-8 (unless you changed
the encoding with --char-encoding) instead of a char reference. The
serializer will automatically convert it to a reference if necessary.

Boris



More information about the xsd-users mailing list