
31 Jul
2007
31 Jul
'07
1:12 a.m.
i am having a problem with hxt, i was wondering if anyone here has experience with it. in particular, i find that the xread function chokes on xml files with xml declarations, and i am not sure why. consider this sample script: module Main where import Text.XML.HXT.Parser main = do xml <- getContents print $ head $ xread xml and this file content (test.xml): <?xml version="1.0"?> <foo><bar>BAR1</bar><bar>BAR2</bar></foo> running: $ runhaskell hxt.hs < test.xml NTree (XError 2 "\"string: \"<?xml version=\\\"1.0\\\"?>\\n<foo><bar>BAR1