
Benedikt Ahrens wrote:
I want to write a program which among other should read some xml file. The xml tags will mostly be custom ones defined by a dtd. My question is: which parsing library to use?
Antoine Latter wrote:
One option I've used before which isn't on the list is on hackage here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xml
Yes, that is a great library for quick-and-dirty xml work. It's very easy to use. And it's very well maintained, because it was written at Galois and is actively used there. But if you need to do more serious XML work, including support and verified compliance for the alphabet soup of XML specs, you need to use one of the other libraries. For example, the xml library will work fine with custom tags. But if you want to verify against the DTD, you'll have to look elsewhere. It is easy to search an XML tree by hand with the xml library, but I don't think it will do an XPath search for you. Etc. By the way, perhaps the xml library should be added to that wikibook page. Hope this helps, Yitz