class TestObject(xmlmap.XmlObject): children = xmlmap.NodeListField('bar', TestSubobject) missing = xmlmap.NodeListField('missing', TestSubobject, required=False)
class ListTestObject(xmlmap.XmlObject): str = xmlmap.StringListField('baz') int = xmlmap.IntegerListField('bar') letters = xmlmap.StringListField('l') empty = xmlmap.StringListField('missing') nodes = xmlmap.NodeListField('sub', SubList)
class XmlObj(xmlmap.XmlObject): bar = xmlmap.NodeField('bar', SubObj) bar_list = xmlmap.NodeListField('bar', SubObj) generic = xmlmap.NodeField('bar', xmlmap.XmlObject)