parameters: (doc, container="div", treebuilder="etree", namespaceHTMLElements=True, **kwargs)
return_statement: return p.parseFragment(doc, container=container, **kwargs)
docstring: Parse an HTML fragment as a string or file-like object into a tree
  
      :arg doc: the fragment to parse as a string or file-like object
  
      :arg container: the container context to parse the fragment in
  
      :arg treebuilder: the treebuilder to use when parsing
  
      :arg namespaceHTMLElements: whether or not to namespace HTML elements
  
      :returns: parsed tree
  
      Example:
  
      >>> from html5lib.html5libparser import parseFragment
      >>> parseFragment('<b>this is a fragment</b>')
      <Element u'DOCUMENT_FRAGMENT' at 0x7feac484b090>
docstring_summary: Parse an HTML fragment as a string or file-like object into a tree
docstring_tokens: Parse an HTML fragment as a string or file - like object into a tree
function: def parseFragment(doc, container="div", treebuilder="etree", namespaceHTMLElements=True, **kwargs):
      """Parse an HTML fragment as a string or file-like object into a tree
  
      :arg doc: the fragment to parse as a string or file-like object
  
      :arg container: the container context to parse the fragment in
  
      :arg treebuilder: the treebuilder to use when parsing
  
      :arg namespaceHTMLElements: whether or not to namespace HTML elements
  
      :returns: parsed tree
  
      Example:
  
      >>> from html5lib.html5libparser import parseFragment
      >>> parseFragment('<b>this is a fragment</b>')
      <Element u'DOCUMENT_FRAGMENT' at 0x7feac484b090>
  
      """
      tb = treebuilders.getTreeBuilder(treebuilder)
      p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
      return p.parseFragment(doc, container=container, **kwargs)
function_tokens: def parseFragment ( doc , container = "div" , treebuilder = "etree" , namespaceHTMLElements = True , * * kwargs ) : tb = treebuilders . getTreeBuilder ( treebuilder ) p = HTMLParser ( tb , namespaceHTMLElements = namespaceHTMLElements ) return p . parseFragment ( doc , container = container , * * kwargs )