예제 #1
0
 class TestObject(xmlmap.XmlObject):
     children = xmlmap.NodeListField('bar', TestSubobject)
     missing = xmlmap.NodeListField('missing', TestSubobject, required=False)
예제 #2
0
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)
예제 #3
0
 class XmlObj(xmlmap.XmlObject):
     bar = xmlmap.NodeField('bar', SubObj)
     bar_list = xmlmap.NodeListField('bar', SubObj)
     generic = xmlmap.NodeField('bar', xmlmap.XmlObject)