HXQ is a fast and space-efficient compiler from XQuery (the standard
query language for XML) to embedded Haskell code. The translation is
based on Haskell templates. It also provides an interpreter for
evaluating ad-hoc XQueries read from input or from files
and optional database connectivity using HDBC.
For more information, look at http://lambda.uta.edu/HXQ/.

A rose tree representation of XML data.
An XML element is: XElem tagname atributes preorder parent children.
The preorder numbering is the document order of elements.
The parent is a cyclic reference to the parent element.