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</ba...\"\" (line 1, column 6):\nunexpected xml\nexpecting legal XML name character\n") [] which clearly indicates a choke on the xml declaration but if i remove the xml declaration, i see no errors and i am able to get a valid data structure printing out any ideas? thanks brad _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe