#NEWLINE# def __init__( self , tag = None , element = None ) : #NEWLINE# #INDENT# if ( tag is not None ) : #NEWLINE# #INDENT# self . element = doc ( ) . createElement ( tag ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( element is not None ) : #NEWLINE# #INDENT# self . element = tag #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( 'Cannot create Element without tag or element' ) #NEWLINE# #UNINDENT# #UNINDENT# self . activeEvents = [ ]