
I am building a prototype for processing ISO 20022 Payment Initiation messages. These messages are in XML format and I want the prototype to be built using Haskell. Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old. I am sure there are packages that have been developed/update in the recent past. Any thoughts?

Did you try looking on Hackage https://hackage.haskell.org/?
After just a quick search I found these:
- xml-parser https://hackage.haskell.org/package/xml-parser
- xml-conduit https://hackage.haskell.org/package/xml-conduit
- hxt https://hackage.haskell.org/package/hxt
- xml https://hackage.haskell.org/package/xml
On Tue, Aug 3, 2021 at 11:46 AM John Arnold
I am building a prototype for processing ISO 20022 Payment Initiation messages. These messages are in XML format and I want the prototype to be built using Haskell.
Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old.
I am sure there are packages that have been developed/update in the recent past. Any thoughts? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Thedward Blevins
Did you try looking on Hackage?
After just a quick search I found these:
* xml-parser * xml-conduit * hxt * xml
The code we have at work related to PAIN.001.001.03 is using the following libs related to XML: - xml-hamlet - xml-conduit - xml-conduit-writer /M -- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus@therning.org @magthe@mastodon.technology http://magnus.therning.org/ You can't depend on your judgement when your imagination is out of focus. — Mark Twain

On Wed, 4 Aug 2021, Magnus Therning wrote:
Thedward Blevins
writes: Did you try looking on Hackage?
After just a quick search I found these:
* xml-parser * xml-conduit * hxt * xml
The code we have at work related to PAIN.001.001.03 is using the following libs related to XML:
- xml-hamlet - xml-conduit - xml-conduit-writer
* xeno * HaXml * xml-basic * tagchup * wraxml

Hello. On 03-08-21 12:45, John Arnold wrote:
Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old.
I think that has more to do with the general xml popularity. People aren't writing XML tutorial in haskell anymore. Now if you look at the json parsing tutorial...
I am sure there are packages that have been developed/update in the recent past. Any thoughts?
The go to option was and is `hxt` [1]. It's a little bit on the huge size, but it should have the biggest use on the ecosystem [2]. There are probably newer options now that use lenses if you are on that sort of thing, but I don't know them. Good luck. Rubén. pgp: 4EE9 28F7 932E F4AD [1]: https://hackage.haskell.org/package/hxt [2]: https://packdeps.haskellers.com/reverse/hxt On 03-08-21 12:45, John Arnold wrote:
I am building a prototype for processing ISO 20022 Payment Initiation messages. These messages are in XML format and I want the prototype to be built using Haskell.
Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old.
I am sure there are packages that have been developed/update in the recent past. Any thoughts?

HaXml is pretty old at this point but one big advantage is it has an executable DtdToHaskell which takes an XML DTD file and automatically creates Haskell data types, a parser, and a pretty-printer. Tom On Tue, Aug 03, 2021 at 12:45:44PM -0400, John Arnold wrote:
I am building a prototype for processing ISO 20022 Payment Initiation messages. These messages are in XML format and I want the prototype to be built using Haskell.
Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old.
I am sure there are packages that have been developed/update in the recent past. Any thoughts?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

DTDToHaskell was indeed a great idea. However, the last time I tried to use HaXml for a real project, I was not able to compile the resulting file because the DTD defined two namespaces. It would be great if someone could address that limitation. As with many other topics, XML handling is an area where it's easy to make a novel library based on a new concept, but *very* hard to create a full, industry-ready implementation that handles non-trivial, real-world DTDs and XML. Just in this thread, people have listed many libraries. Their features overlap in part but not perfectly. Their level of maintainership is unclear. Comparing all of this work to determine what a good choice would be is VERY hard* . To me, this highlights the fact that our community might do better if we focused on contributing to existing implementations, and resisted the urge to create new ones. All the best, Ivan (*It's not always easy to measure any one dimension. The complexity of comparing implementations may quickly degenerate to something like m * (n ^ 2) where m is the number of dimensions compared and n is the number of solutions, but I think it can get even worse, but even then you may be left with the task of defining a good order relationship on an m-dimensional space. All of this to say that it's REALLY complex and adding a new implementation should rarely be seen as the solution.) On Sun, 15 Aug 2021 at 16:17, amindfv--- via Haskell-Cafe < haskell-cafe@haskell.org> wrote:
HaXml is pretty old at this point but one big advantage is it has an executable DtdToHaskell which takes an XML DTD file and automatically creates Haskell data types, a parser, and a pretty-printer.
Tom
On Tue, Aug 03, 2021 at 12:45:44PM -0400, John Arnold wrote:
I am building a prototype for processing ISO 20022 Payment Initiation messages. These messages are in XML format and I want the prototype to be built using Haskell.
Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old.
I am sure there are packages that have been developed/update in the recent past. Any thoughts?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I really enjoyed hxt. If it's of interest, here's a simple program I wrote
to convert Freeplane (.mm) files to org format.
https://github.com/JeffreyBenjaminBrown/rescue-freeplane
On Sun, Aug 15, 2021 at 3:50 PM Ivan Perez
DTDToHaskell was indeed a great idea. However, the last time I tried to use HaXml for a real project, I was not able to compile the resulting file because the DTD defined two namespaces. It would be great if someone could address that limitation.
As with many other topics, XML handling is an area where it's easy to make a novel library based on a new concept, but *very* hard to create a full, industry-ready implementation that handles non-trivial, real-world DTDs and XML.
Just in this thread, people have listed many libraries. Their features overlap in part but not perfectly. Their level of maintainership is unclear. Comparing all of this work to determine what a good choice would be is VERY hard* . To me, this highlights the fact that our community might do better if we focused on contributing to existing implementations, and resisted the urge to create new ones.
All the best,
Ivan
(*It's not always easy to measure any one dimension. The complexity of comparing implementations may quickly degenerate to something like m * (n ^ 2) where m is the number of dimensions compared and n is the number of solutions, but I think it can get even worse, but even then you may be left with the task of defining a good order relationship on an m-dimensional space. All of this to say that it's REALLY complex and adding a new implementation should rarely be seen as the solution.)
On Sun, 15 Aug 2021 at 16:17, amindfv--- via Haskell-Cafe < haskell-cafe@haskell.org> wrote:
HaXml is pretty old at this point but one big advantage is it has an executable DtdToHaskell which takes an XML DTD file and automatically creates Haskell data types, a parser, and a pretty-printer.
Tom
On Tue, Aug 03, 2021 at 12:45:44PM -0400, John Arnold wrote:
I am building a prototype for processing ISO 20022 Payment Initiation messages. These messages are in XML format and I want the prototype to be built using Haskell.
Conducting a search for 'Haskell XML parsing' yields postings that are in the region of 10+yrs old.
I am sure there are packages that have been developed/update in the recent past. Any thoughts?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- Jeff Brown | Jeffrey Benjamin Brown LinkedIn https://www.linkedin.com/in/jeffreybenjaminbrown | Github https://github.com/jeffreybenjaminbrown | Twitter https://twitter.com/carelogic | Facebook https://www.facebook.com/mejeff.younotjeff | very old Website https://msu.edu/~brown202/
participants (8)
-
amindfv@mailbox.org
-
Henning Thielemann
-
Ivan Perez
-
Jeffrey Brown
-
John Arnold
-
Magnus Therning
-
Ruben Astudillo
-
Thedward Blevins