'Document tree.'

@cached_property
def tree(self):

    content = (u'<root>%s</root>' % self.content)
    tree = self.fromstring(content)
    try:
        self.tostring(tree, encoding=six.text_type)
    except UnicodeDecodeError:
        if self.soupparser:
            tree = self.soupparser.fromstring(content)
        else:
            raise
    return tree
