Closed DareDevilDenis closed 3 months ago
Thanks for reporting @DareDevilDenis the fix is on main!
xml = """<RootNode>
<Field name="LeafType1">1</Field>
<Field name="LeafType2">2</Field>
</RootNode>"""
parser = XmlParser()
result = parser.from_string(xml)
print(result)
RootNode(field_value=[LeafType1(value=1, name='LeafType1'), LeafType2(value=2, name='LeafType2')])
Thanks @tefra for the very quick fix! 👍
Using:
I ran
xsdata generate my_schema.xsd
on the following schema:This created my_schema.py (this looks correct):
However when I parsed the following input XML:
Using the following code:
The output is wrong - we get LeafType1 twice:
Here are the files: xsdata_issue_1012.zip