'Parse a document from a string, returning the document node.'

def parseString(self, string):

    parser = self.getParser()
    try:
        parser.Parse(string, True)
        self._setup_subset(string)
    except ParseEscape:
        pass
    doc = self.document
    self.reset()
    self._parser = None
    return doc
