-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xsi:type not working on xsd:anyType elements #306
Comments
Hi @mihxil yes currently on Its a bit trickier for wildcards because the parser needs to scan the whole context to match any defined models that match the active qualified name, but it's definitely one of the next things I want to work on. |
I am sure I can find examples from the w3c suite but it would be great if you could share your schema and a sample xml. |
I was just trying it out in a project that currently uses pyxb. Approximately at this line: I'm sure that I can make up a simpler example though. |
thank you @mihxil it's perfect. |
Thansk a lot. I'll take a further look as soon as I've some time! |
I have a use case were we wrap lists of 'items' in an xml where the elements are in the xsd marked as 'xs:anyType'.
The xml though specifies the type with something like:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="api:searchResultItem"
so, the actual type is specified with an xsi:type attribute.
If I unmarshal this xml with xsdata these object just become
AnyElement
s and are not unmarshaled to the correct type (as e.g. pyxb and jaxb would do).I don't rule out that I do something wrong, but as far as I looked into the code it is not supported at all. But please correct me if I'm wrong.
The text was updated successfully, but these errors were encountered: