serum v1.2.0 Serum.HtmlTreeHelper View Source

Provides useful functions for working with HTML trees.

Link to this section Summary

Functions

Performs a post-order traversal of the given HTML tree.

Performs a post-order traversal of the given HTML tree with an accumulator.

Link to this section Types

Link to this type

acc_tree_fun()

View Source
acc_tree_fun() :: (tree(), term() -> {tree(), term()})
Link to this type

attribute()

View Source
attribute() :: {binary(), binary()}
Link to this type

tree()

View Source
tree() :: binary() | tag() | [binary() | tag()]
Link to this type

tree_fun()

View Source
tree_fun() :: (tree() -> tree())

Link to this section Functions

Link to this function

traverse(tree, fun)

View Source
traverse(tree(), tree_fun()) :: tree()

Performs a post-order traversal of the given HTML tree.

Link to this function

traverse(tree, acc, fun)

View Source
traverse(tree(), term(), acc_tree_fun()) :: {tree(), term()}

Performs a post-order traversal of the given HTML tree with an accumulator.