#NEWLINE# def __init__( self , document = None , node = None , root = None ) : #NEWLINE# #INDENT# self . document = document #NEWLINE# if ( ( self . document is None ) and ( node is not None ) ) : #NEWLINE# #INDENT# impl = minidom . getDOMImplementation ( ) #NEWLINE# self . resource = impl . createDocument ( None , None , None ) #NEWLINE# self . resource . appendChild ( node ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . document is None ) : #NEWLINE# #INDENT# impl = minidom . getDOMImplementation ( ) #NEWLINE# self . resource = impl . createDocument ( None , root , None )