pydantic-xml icon indicating copy to clipboard operation
pydantic-xml copied to clipboard

How to handle xsi:type ?

Open gizmo84 opened this issue 5 months ago • 2 comments

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 ?

gizmo84 avatar Sep 10 '24 11:09 gizmo84