<s> """<STR_LIT>""" <EOL> class ResultEntry ( dict ) : <EOL> """<STR_LIT>""" <EOL> def startElement ( self , name , attrs , connection ) : <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self [ '<STR_LIT:id>' ] = value <EOL> elif name == '<STR_LIT>' : <EOL> self [ '<STR_LIT>' ] = value <EOL> elif name == '<STR_LIT>' : <EOL> self [ '<STR_LIT>' ] = value <EOL> elif name == '<STR_LIT>' : <EOL> self [ '<STR_LIT>' ] = value <EOL> elif name == '<STR_LIT>' : <EOL> self [ '<STR_LIT>' ] = value <EOL> elif name == '<STR_LIT>' : <EOL> self [ '<STR_LIT>' ] = value <EOL> class BatchResults ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , parent ) : <EOL> self . parent = parent <EOL> self . results = [ ] <EOL> self . errors = [ ] <EOL> def startElement ( self , name , attrs , connection ) : <EOL> if name . endswith ( '<STR_LIT>' ) : <EOL> entry = ResultEntry ( ) <EOL> self . results . append ( entry ) <EOL> return entry <EOL> if name == '<STR_LIT>' : <EOL> entry = ResultEntry ( ) <EOL> self . errors . append ( entry ) <EOL> return entry <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> setattr ( self , name , value ) </s>
