'Parses XML string and returns object representation of relevant info.
Args:
xml_str: The XML string.
Returns:
A list of DispatchEntry objects defining how URLs are dispatched to
modules.
Raises:
AppEngineConfigException: In case of malformed XML or illegal inputs.'

def ProcessXml(self, xml_str):

    try:
        self.dispatch_entries = []
        self.errors = []
        xml_root = ElementTree.fromstring(xml_str)
        if (xml_root.tag != 'dispatch-entries'):
            raise AppEngineConfigException('Root    tag    must    be    <dispatch-entries>')
        for child in xml_root.getchildren():
            self.ProcessDispatchNode(child)
        if self.errors:
            raise AppEngineConfigException('\n'.join(self.errors))
        return self.dispatch_entries
    except ElementTree.ParseError:
        raise AppEngineConfigException('Bad    input    --    not    valid    XML')
