#NEWLINE# def _EndElementHandler( self , name ) : #NEWLINE# #INDENT# 'End of an element has occured.\n\n    Args:\n      name: str, name of the element, like "dict"\n    ' #NEWLINE# if ( name == 'plist' ) : #NEWLINE# #INDENT# if self . _current_value : #NEWLINE# #INDENT# self . _plist = self . _CurrentValue ( ) #NEWLINE# self . _ReleaseValue ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _plist = None #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# if ( self . _CurrentMode ( ) == 'value' ) : #NEWLINE# #INDENT# self . _ReleaseMode ( ) #NEWLINE# value = self . _CurrentValue ( ) #NEWLINE# self . _ReleaseValue ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _CurrentMode ( ) == 'mvalue' ) : #NEWLINE# #INDENT# value = [ ] #NEWLINE# while ( self . _CurrentMode ( ) == 'mvalue' ) : #NEWLINE# #INDENT# self . _ReleaseMode ( ) #NEWLINE# value . insert ( 0 , self . _CurrentValue ( ) ) #NEWLINE# self . _ReleaseValue ( ) #NEWLINE# #UNINDENT# value = '' . join ( value ) #NEWLINE# if ( self . _CurrentMode ( ) == 'data' ) : #NEWLINE# #INDENT# value = self . _ParseData ( value ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( name in [ 'array' , 'dict' ] ) : #NEWLINE# #INDENT# value = self . _CurrentValue ( ) #NEWLINE# self . _ReleaseValue ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'string' ) : #NEWLINE# #INDENT# value = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( name == 'key' ) : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# value = '' #NEWLINE# #UNINDENT# self . _NewKey ( value ) #NEWLINE# #UNINDENT# release_key = ( ( name != 'key' ) and ( self . _ParentMode ( ) == 'dict' ) ) #NEWLINE# self . _ReleaseMode ( ) #NEWLINE# if ( self . _CurrentMode ( ) == 'plist' ) : #NEWLINE# #INDENT# self . _NewValue ( value ) #NEWLINE# self . _NewMode ( 'value' ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( self . _CurrentMode ( ) == 'dict' ) : #NEWLINE# #INDENT# self . _CurrentValue ( ) [ self . _CurrentKey ( ) ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _CurrentMode ( ) == 'array' ) : #NEWLINE# #INDENT# self . _CurrentValue ( ) . append ( value ) #NEWLINE# #UNINDENT# #UNINDENT# if release_key : #NEWLINE# #INDENT# self . _ReleaseKey ( )