#NEWLINE# def startElement( self , name , atts ) : #NEWLINE# #INDENT# 'Handle an event for the beginning of an element.' #NEWLINE# try : #NEWLINE# #INDENT# klass = self . _get_class ( name ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# raise POM . ValidationError ( ( 'Undefined element tag: ' + name ) ) #NEWLINE# #UNINDENT# attr = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( name , value ) in atts . items ( ) : #NEWLINE# #INDENT# attr [ keyword_identifier ( POM . normalize_unicode ( name ) ) ] = POM . unescape ( value ) #NEWLINE# #UNINDENT# obj = klass ( ** attr ) #NEWLINE# self . stack . append ( obj )