Ok, I got it working:
module Main where
import qualified Text.XML.HaXml as X
import qualified Text.XML.HaXml.Parse as XP
import qualified Text.XML.HaXml.Pretty as XPP
import qualified IO
import qualified System
load fn = do
contents <- readFile fn
return $ XP.xmlParse fn contents
main = do [xml] <- System.getArgs
d <- load xml
IO.putStrLn $ show $ XPP.document $ d
<?xml version="1.0" encoding="UTF-8"?>
<employee>
<!-- A list of employees -->
<name EmpType="Regular">
<first>Almanzo</first>
<last>Wilder</last>
</name>
<name EmpType="Contract">
<first>Laura</first>
<last>Ingalls</last>
</name>
</employee>
_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell