hexpat-0.1: wrapper for expat, the fast XML parserSource codeContentsIndex
Text.XML.Expat.Tree
Description
The Expat.Tree module provides a simplified interface to parsing, that returns a tree of the XML structure. (Note that this is not a lazy parse of the document: as soon as the root node is accessed, the entire document is parsed.)
Synopsis
parse :: Maybe String -> String -> Maybe Node
data Node
= Element {
eName :: String
eAttrs :: [(String, String)]
eChildren :: [Node]
}
| Text String
Documentation
parse :: Maybe String -> String -> Maybe NodeSource
parse enc doc parses XML content doc with optional encoding enc, and returns the root Node of the document if there were no parsing errors.
data Node Source
Simplistic XML tree representation.
Constructors
Element
eName :: String
eAttrs :: [(String, String)]
eChildren :: [Node]
Text String
show/hide Instances
Produced by Haddock version 2.3.0