Exemple #1
0
 class TestSubobject(xmlmap.XmlObject):
     val = xmlmap.IntegerField('baz')
Exemple #2
0
 class TestObject(xmlmap.XmlObject):
     val = xmlmap.IntegerField('bar[2]/baz', required=True)
     count = xmlmap.IntegerField('count(//bar)')
     missing = xmlmap.IntegerField('missing')
     nan = xmlmap.IntegerField('@id')
Exemple #3
0
 class XmlObj(xmlmap.XmlObject):
     ROOT_NAME = 'foo'
     id = xmlmap.StringField('@id')
     strings = xmlmap.StringListField('str')
     int = xmlmap.IntegerField('int')
     bool = xmlmap.SimpleBooleanField('bool', 'yes', 'no')