# `Floki.HTMLParser`
[🔗](https://github.com/philss/floki/blob/v0.38.1/lib/floki/html_parser.ex#L1)

A entry point to dynamic dispatch functions to
the configured HTML parser.

The configuration can be done with the `:html_parser`
option when calling the functions, or for the `:floki` application:

    Floki.parse_document(document, html_parser: Floki.HTMLParser.FastHtml)

Or:

    use Mix.Config
    config :floki, :html_parser, Floki.HTMLParser.Mochiweb

The default parser is Mochiweb, which comes with Floki.
You can also choose between Html5ever or FastHtml.

And it's possible to pass down options to the parsers using
the `parser_args` option.

This module is also a behaviour that those parsers must implement.

# `parse_document`

```elixir
@callback parse_document(html(), Keyword.t()) :: result(Floki.html_tree())
```

# `parse_document_with_attributes_as_maps`

```elixir
@callback parse_document_with_attributes_as_maps(html(), Keyword.t()) ::
  result(Floki.html_tree())
```

# `parse_fragment`

```elixir
@callback parse_fragment(html(), Keyword.t()) :: result(Floki.html_tree())
```

# `parse_fragment_with_attributes_as_maps`

```elixir
@callback parse_fragment_with_attributes_as_maps(html(), Keyword.t()) ::
  result(Floki.html_tree())
```

# `parse_document`

# `parse_fragment`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
