For applications which do not need all the details in the full XML Information Set, module ETree provides a simplified representation:
data ETree
= Element Name AttList [Etree]
| Text String
xmlToETree :: XML -> ETree
etreeToXML :: ETree -> XML