brad clawsie wrote:
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.
[...]

This is intended. Generally, wherever the HXT manual says "content" (e.g., the description of xread says "with the XML content parser"), it means the (one and only) top level element, i.e., the <foo>...</foo>.

To parse a complete XML file, look for a parser that says "document", which means the whole thing, e.g., parseXmlDocument.

main = do
  xml <- getContents
  print $ head $ parseXmlDocument "test.xml" xml
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to