<s> class SummaryMap ( dict ) : <EOL> def __init__ ( self , parent = None ) : <EOL> self . parent = parent <EOL> dict . __init__ ( self ) <EOL> def startElement ( self , name , attrs , connection ) : <EOL> pass <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT:key>' : <EOL> self . _name = value <EOL> elif name == '<STR_LIT:value>' : <EOL> try : <EOL> self [ self . _name ] = int ( value ) <EOL> except ValueError : <EOL> self [ self . _name ] = value <EOL> else : <EOL> setattr ( self , name , value ) </s>
