views:

650

answers:

3

I see that there is a few of XML processing libraries in Haskell.

  • HaXml seems to be the most popular (according to dons)
  • HXT seems to be the most advanced (but also the most difficult to learn thanks to arrows)
  • xml which seems to be just the basic parser
  • HXML seems to be abandoned
  • tagsoup and tagchup
  • libXML and libXML SAX bindings

So, which library to choose if I want it

  • to be reasonably powerful (to extract data from XML and to modify XML)
  • likely to be supported long time in the future
  • to be a “community choice” (default choice)

And while most of the above seem to be sufficient for my current needs, what are the reason to choose one of them over the others?

UPD 20091222:

Some notes about licenses:

+5  A: 

I would personally recommend HXT because it uses arrows, which are a very useful and powerful tool to learn, and an XML parsing library is the perfect use for arrows (they were first invented to solve various parsing problems that monads couldn't). Arrows are also starting to be used outside of pure functional programming, such as Arrowlets in JavaScript.

Will
Thanks, Will! That's why I started learning HXT, but I am also afraid that code written with HXT and arrows is less friendly for potential contributors. Also, it alarms me that HaXml is much more popular.
jetxee
+8  A: 

I would recommend:

  1. xml, if your task is simple
  2. haxml, if your task is complex
  3. hxt, if you like arrows
  4. hexpat if you need high performance
Don Stewart
Thank you, Don. That's the kind of suggestion I was looking for.
jetxee
Though I will not accept the answer yet as I hope to see other opinions.
jetxee
"likely to be supported long time in the future" I would definitely use Haxml. It is 10 years old, and the authors are very active.
Don Stewart
Well, this is an important reason to choose HaXml. Thanks!
jetxee
+1  A: 

Arrows are friendly.

Tony Morris