Floki v0.9.0 Floki.DeepText

DeepText is a strategy to get text nodes from a HTML tree using a deep search algorithm. It will get all string nodes and concat them.

Summary

Functions

Get text nodes from a deep tree of HTML nodes

Types

html_tree :: tuple | list

Functions

get(html_tree, sep \\ "")

Specs

get(html_tree, binary) :: binary

Get text nodes from a deep tree of HTML nodes.

Examples

iex> Floki.DeepText.get([{"a", [], ["The meaning of life is...", {"strong", [], ["something else"]}] }])
"The meaning of life is...something else"

iex> Floki.DeepText.get([{"a", [], ["The meaning of life is...", {"strong", [], ["something else"]}] }], " ")
"The meaning of life is... something else"