#NEWLINE# def set_root( self , root ) : #NEWLINE# #INDENT# if isinstance ( root , ElementNode ) : #NEWLINE# #INDENT# for ( keyname , xmlattrib ) in root . ATTRIBUTES . items ( ) : #NEWLINE# #INDENT# if ( self . a_decl == FIXED ) : #NEWLINE# #INDENT# root . set_attribute ( keyname , xmlattrib . default ) #NEWLINE# #UNINDENT# #UNINDENT# self . root = root #NEWLINE# self . dirty = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'root document must be POM ElementNode.' )