#NEWLINE# @ classmethod #NEWLINE# def parse( cls , xml_str , store_xml = False ) : #NEWLINE# #INDENT# 'Convert an XML string into a nice instance tree of XMLNodes.\n\n        xml_str -- the XML to parse\n        store_xml -- if True, stores the XML string in the root XMLNode.xml\n\n        ' #NEWLINE# dom = xml . dom . minidom . parseString ( xml_str ) #NEWLINE# root_node = XMLNode ( ) #NEWLINE# if store_xml : #NEWLINE# #INDENT# root_node . xml = xml_str #NEWLINE# #UNINDENT# return cls . __parse_element ( store_xml . firstChild , root_node )