HaXml adapter

The HaXmlAdapter module contains modified versions of HaXml's processXmlWith driver:

processXmlWith' 	:: (Content -> [Content]) -> IO ()
processXmlWith'' 	:: (Content -> [Content]) -> IO ()

The first uses the HXML parser instead of the HaXml one; the second in addition uses HXML's serializer. These versions should have better space performance than processXmlWith (although there are still a few problems).

NOTE: To avoid a space fault in HaXml version 1.02 and earlier, you may wish to replace the definition of cat in XmlCombinators.hs with the following implementation:

cat :: [a->[b]] -> (a->[b])
cat [] = const []
cat l  = foldr1 (lift (++)) l

With this patch and processXmlWith'', the space requirements of many existing HaXml programs may be significantly reduced.

Adapters for converting to and from HaXml's internal representation (Content) are also available, along with a few utilities:

toContent 		:: Tree XMLNode -> Content
fromContent 		:: Content -> Tree XMLNode

buildContent		:: [XMLEvent] -> Content
serializeContent	:: Content -> [XMLEvent]

parseContent 		:: String -> Content
showContent		:: Content -> String

showContent		=  showXML . serializeContent
parseContent		=  buildContent . parseInstance