'Create the document root'

def insertRoot(self, token):

    docStr = ''
    if (self.doctype and self.doctype.name and (not self.doctype.name.startswith('"'))):
        docStr += ('<!DOCTYPE    %s' % self.doctype.name)
        if ((self.doctype.publicId is not None) or (self.doctype.systemId is not None)):
            docStr += ('    PUBLIC    "%s"    "%s"' % ((self.doctype.publicId or ''), (self.doctype.systemId or '')))
        docStr += '>'
    docStr += '<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>'
    try:
        root = etree.fromstring(docStr)
    except etree.XMLSyntaxError:
        print docStr
        raise
    for comment_token in self.initial_comments:
        root.addprevious(etree.Comment(comment_token['data']))
    self.document = self.documentClass()
    self.document._elementTree = root.getroottree()
    name = token['name']
    namespace = token.get('namespace', self.defaultNamespace)
    if (namespace is None):
        etree_tag = name
    else:
        etree_tag = ('{%s}%s' % (namespace, name))
    root.tag = etree_tag
    root_element = self.elementClass(name, namespace)
    root_element._element = root
    self.document._childNodes.append(root_element)
    self.openElements.append(root_element)
    self.insertComment = super(TreeBuilder, self).insertComment
