def process(self):
suites = None<EOL>if isinstance(self.tree, ET.Element):<EOL><INDENT>root = self.tree<EOL><DEDENT>else:<EOL><INDENT>root = self.tree.getroot()<EOL><DEDENT>if root.tag == "<STR_LIT>":<EOL><INDENT>root = root[<NUM_LIT:0>]<EOL><DEDENT>if root.tag == "<STR_LIT>":<EOL><INDENT>suites = [root]<EOL><DEDENT>if root.tag == "<STR_LIT>":<EOL><INDENT>suites = [x for x in root]<EOL><DEDENT>assert suites, "<STR_LIT>"<EOL>for suite in suites:<EOL><INDENT>cursuite = Suite()<EOL>self.suites.append(cursuite)<EOL>cursuite.name = suite.attrib["<STR_LIT:name>"]<EOL>if "<STR_LIT>" in suite.attrib:<EOL><INDENT>cursuite.package = suite.attrib["<STR_LIT>"]<EOL><DEDENT>cursuite.duration = float(suite.attrib.get("<STR_LIT:time>", '<STR_LIT:0>').replace('<STR_LIT:U+002C>','<STR_LIT>'))<EOL>for element in suite:<EOL><INDENT>if element.tag == "<STR_LIT:error>":<EOL><INDENT>errtag = {<EOL>"<STR_LIT:message>": element.attrib.get("<STR_LIT:message>", "<STR_LIT>"),<EOL>"<STR_LIT:type>": element.attrib.get("<STR_LIT:type>", "<STR_LIT>"),<EOL>"<STR_LIT:text>": element.text<EOL>}<EOL>cursuite.errors.append(errtag)<EOL><DEDENT>if element.tag == "<STR_LIT>":<EOL><INDENT>cursuite.stdout = element.text<EOL><DEDENT>if element.tag == "<STR_LIT>":<EOL><INDENT>cursuite.stderr = element.text<EOL><DEDENT>if element.tag == "<STR_LIT>":<EOL><INDENT>for prop in element:<EOL><INDENT>if prop.tag == "<STR_LIT>":<EOL><INDENT>cursuite.properties[prop.attrib["<STR_LIT:name>"]] = prop.attrib["<STR_LIT:value>"]<EOL><DEDENT><DEDENT><DEDENT>if element.tag == "<STR_LIT>":<EOL><INDENT>testcase = element<EOL>if not testcase.attrib.get("<STR_LIT>", None):<EOL><INDENT>testcase.attrib["<STR_LIT>"] = NO_CLASSNAME<EOL><DEDENT>if testcase.attrib["<STR_LIT>"] not in cursuite:<EOL><INDENT>testclass = Class()<EOL>testclass.name = testcase.attrib["<STR_LIT>"]<EOL>cursuite[testclass.name] = testclass<EOL><DEDENT>testclass = cursuite[testcase.attrib["<STR_LIT>"]]<EOL>newcase = Case()<EOL>newcase.name = testcase.attrib["<STR_LIT:name>"]<EOL>newcase.testclass = testclass<EOL>newcase.duration = float(testcase.attrib.get("<STR_LIT:time>", '<STR_LIT:0>').replace('<STR_LIT:U+002C>','<STR_LIT>'))<EOL>testclass.cases.append(newcase)<EOL>for child in testcase:<EOL><INDENT>if child.tag == "<STR_LIT>":<EOL><INDENT>newcase.skipped = child.text<EOL>if "<STR_LIT:message>" in child.attrib:<EOL><INDENT>newcase.skipped_msg = child.attrib["<STR_LIT:message>"]<EOL><DEDENT><DEDENT>elif child.tag == "<STR_LIT>":<EOL><INDENT>newcase.stdout = child.text<EOL><DEDENT>elif child.tag == "<STR_LIT>":<EOL><INDENT>newcase.stderr = child.text<EOL><DEDENT>elif child.tag == "<STR_LIT>":<EOL><INDENT>newcase.failure = child.text<EOL>if "<STR_LIT:message>" in child.attrib:<EOL><INDENT>newcase.failure_msg = child.attrib["<STR_LIT:message>"]<EOL><DEDENT><DEDENT>elif child.tag == "<STR_LIT:error>":<EOL><INDENT>newcase.failure = child.text<EOL>if "<STR_LIT:message>" in child.attrib:<EOL><INDENT>newcase.failure_msg = child.attrib["<STR_LIT:message>"]<EOL><DEDENT><DEDENT>elif child.tag == "<STR_LIT>":<EOL><INDENT>for property in child:<EOL><INDENT>newproperty = Property()<EOL>newproperty.name = property.attrib["<STR_LIT:name>"]<EOL>newproperty.value = property.attrib["<STR_LIT:value>"]<EOL>newcase.properties.append(newproperty)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>
populate the report from the xml
:return: