Floki.parse_document

You're seeing just the function parse_document, go back to Floki module for more information.
Link to this function

parse_document(document, opts \\ [])

View Source

Specs

parse_document(binary(), Keyword.t()) ::
  {:ok, html_tree()} | {:error, String.t()}

Parses a HTML Document from a string.

It will use the available parser from application env or the one from the :html_parser option. Check https://github.com/philss/floki#alternative-html-parsers for more details.

Examples

iex> Floki.parse_document("<html><head></head><body>hello</body></html>")
{:ok, [{"html", [], [{"head", [], []}, {"body", [], ["hello"]}]}]}

iex> Floki.parse_document("<html><head></head><body>hello</body></html>", html_parser: Floki.HTMLParser.Mochiweb)
{:ok, [{"html", [], [{"head", [], []}, {"body", [], ["hello"]}]}]}