The Expat.Tree module provides a simplified interface to parsing, that returns a tree of the XML structure. It is written using the lower-level bindings in the Text.XML.Expat.IO module. (Note that this is not a lazy parse of the document: as soon as the root node is accessed, the entire document is parsed.)
parse enc doc parses lazy bytestring XML content
doc with optional
enc and returns the root
Node of the document if there
were no parsing errors.
Simplistic XML tree representation.