'Gives the parsed HTML of element\'s content.  May return an
HtmlElement (from lxml.html) or an XHTML tree.  If the element
is ``type="text"`` then it is returned as quoted HTML.
You can also set this attribute to either an lxml.html
element, an XHTML element, or an HTML string.
Raises AttributeError if this is not HTML content.'

def _html__get(self):

    if (self.type == 'html'):
        content = self.text
    elif (self.type == 'text'):
        content = cgi.escape(self.text)
    elif (self.type == 'xhtml'):
        div = copy.deepcopy(self[0])
        for el in div.getiterator():
            if el.tag.startswith('{'):
                el.tag = el.tag.split('}', 1)[1]
        if div.tag.startswith('{'):
            div.tag = el.tag.split('}', 1)[1]
        from lxml.html import tostring
        content = tostring(div)
    else:
        raise AttributeError(('Not    an    HTML    or    text    content    (type=%r)' % self.type))
    from lxml.html import fromstring
    return fromstring(content)
