python pyxb - unmarshaling a list of subtypes

kahuta

New Member
I am using pyxb 1.1.5 ... created binding module for the xsd.
Trying to populate and create xml ...
BaseFooList has a list of BaseFooTrying to populate with a sub-type FooOne will raise a validation exception when populatingthe sub-type element\[code\]t = vnet.root(type="GGG")t.city="C1"t.name="N1"t.foos = BaseFooList()foo1 = FooOne()foo1.next="sss"t.foos.item.append(foo1)print t.toxml()\[/code\]===>pyxb.exceptions_.StructuralBadDocumentError: Validation is required when no element_use can be foundThanks,
Ran
 
Back
Top