#NEWLINE# def parseEtree( inFileName ) : #NEWLINE# #INDENT# doc = parsexml_ ( inFileName ) #NEWLINE# rootNode = doc . getroot ( ) #NEWLINE# ( rootTag , rootClass ) = get_root_tag ( rootNode ) #NEWLINE# if ( rootClass is None ) : #NEWLINE# #INDENT# rootTag = 'Unix_User_Account' #NEWLINE# rootClass = UnixUserAccountObjectType #NEWLINE# #UNINDENT# rootObj = rootClass . factory ( ) #NEWLINE# rootObj . build ( rootNode ) #NEWLINE# doc = None #NEWLINE# rootElement = rootObj . to_etree ( None , name_ = rootTag ) #NEWLINE# content = etree_ . tostring ( rootElement , pretty_print = True , xml_declaration = True , encoding = 'utf-8' ) #NEWLINE# sys . stdout . write ( content ) #NEWLINE# sys . stdout . write ( '\n' ) #NEWLINE# return ( rootObj , rootElement )