xmlbf-xmlhtml-0.1: xmlhtml backend support for the xmlbf library.

Safe HaskellNone
LanguageHaskell2010

Xmlbf.XmlHtml

Synopsis

Documentation

element Source #

Arguments

:: Node

A Node from Text.XmlHtml.

-> Either String Node

A Node from Xmlbf.

Convert a Node from Text.XmlHtml into an Node from Xmlbf, if possible.

element' Source #

Arguments

:: Node

A Node from Text.XmlHtml.

-> Either String (Maybe Node) 

Like element, but returns Nothing in case the given node is a Comment. Children Comments are discarded from the result.

nodesXml Source #

Arguments

:: ByteString

Raw XML fragment.

-> Either String [Node]

Nodes from Xmlbf

Parses a given UTF8-encoded raw XML fragment into a, using the xeno Haskell library, so all of xeno's parsing quirks apply.

You can provide the output of this function as input to Xmlbf's runParser.

The given XML can contain more zero or more text or element nodes.

Comments are discarded from the resulting nodes and their children.

Surrounding whitespace is not stripped.

nodesHtml Source #

Arguments

:: ByteString

Raw HTML fragment.

-> Either String [Node]

Nodes from Xmlbf

Like nodesXml, but parses using xmlhtml's quirks HTML mode.