[xsd-users] Problem with parsing xml documents containing
boris at codesynthesis.com
Mon Feb 22 09:37:27 EST 2010
Feng Tony <fengtr at gmail.com> writes:
> How can I use xsd to parse xml documents containing Chinese characters?
> I use "char" char type.
In this case Chinese characters will be encoded in UTF-8.
> If wchar_t was used, the element "<xs:enumeration value="°C"/>" in xml
> schema will be generated as L"\xB0""C" and the compiler complains:
> 1>.\SCL_Enums.cxx(5246) : error C2308: concatenating mismatched strings
> 1> Concatenating wide "°" with narrow "C"
Hm, that's a bug in XSD. Thanks for reporting it. I have fixed it for
the upcoming 3.3.0 release. Can you download this pre-release binary
and see if it helps:
> My project is to parse xml documents conform to IEC61850-6 standard
We have tested this schema with XSD (with --char-type char) and
everything appears to be working fine.
More information about the xsd-users