polysoup-0.3.0: Online XML parsing with polyparse and tagsoup

Safe HaskellNone




XML as a tree of XML tags.

The module provides an XmlTree data type, which can be used to represent a parsed XML file. The XmlTree structure can be generated lazily by using the parseTree (or parseForest) function on any string-like input supported by the tagsoup library.

Note, that the parsing functions do not validate correctness of the input XML data.


XML Tree

type XmlTree s = Tree (Tag s)Source

A parsed XML tree. Closing tags are not preserved.

type XmlForest s = [XmlTree s]Source

A parsed XML forest. Closing tags are not preserved.


parseTree :: Eq s => [Tag s] -> XmlTree sSource

Parse XML tree from a list of tags.

parseForest :: Eq s => [Tag s] -> XmlForest sSource

Parse XML forest from a list of tags. Note, that if the XML file has additional headers, the parseForest function has to be used to parse it correctly.


renderTree :: XmlTree s -> [Tag s]Source

Render XML tree tags.

renderForest :: XmlForest s -> [Tag s]Source

Render XML forest tags.