'Parse a markdown document into an ElementTree.
Given a list of lines, an ElementTree object (not just a parent
Element) is created and the root element is passed to the parser
as the parent. The ElementTree object is returned.
This should only be called on an entire document, not pieces.'

def parseDocument(self, lines):

    self.root = util.etree.Element(self.markdown.doc_tag)
    self.parseChunk(self.root, u'\n'.join(lines))
    return util.etree.ElementTree(self.root)
