code: def htmlParseDoc(cur, encoding):
      
      ret = libxml2mod.htmlParseDoc(cur, encoding)
      if ret is None:raise parserError('htmlParseDoc() failed')
      return xmlDoc(_obj=ret)
docs: parse an HTML in-memory document and build a tree.