Can somebody point me to the right direction as I'm unable to generate binding classes with PyXB
when element names are non ASCII?
The minimal reproducible example:
<?xml version="1.0" encoding="utf8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Address">
<xs:complexType>
<xs:sequence>
<xs:element name="Country" type="xs:string" />
<xs:element name="Street" type="xs:string" />
<xs:element name="Town" type="xs:string" />
<xs:element name="Дом" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
(look for the <xs:element name="Дом" type="xs:string" />
where I use cyrillic.
The encoding of the file is utf8
.
However, when I try:
pyxbgen -u example.xsd -m example
I got the error:
Traceback (most recent call last):
File "/home/sergey/anaconda3/lib/python3.5/xml/sax/expatreader.py", line 210, in feed
self._parser.Parse(data, isFinal)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 9, column 26
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sergey/anaconda3/bin/pyxbgen", line 52, in <module>
generator.resolveExternalSchema()
.......
which points to the cyrillic name of the element. What am I missing?