pydantic-xml
pydantic-xml copied to clipboard
How to handle xsi:type ?
Hello and thanks again for this amazing tool / lib :)
I have a question regarding one of my parser:
<ns1:Description xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:CreationDescriptionType">
<ns1:Description xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:ContentEntityType">
How to best handle those xsi:type ? I tried different approach, but I'm not sure if I am on the right way.
Should I declare two class "CreationDescription" / "ContentEntity" or Generics ?