Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing XML in Elm

Tags:

elm

In Elm, how do I parse an XML file? I see lots of example for JSON decoders, but I cannot find an XML decoder.

What alternatives do I have besides REGEX? My XML is pretty simple, and that would work, but I know that's a bad idea.

like image 248
jm. Avatar asked Sep 12 '25 17:09

jm.


2 Answers

This is pretty new:

http://package.elm-lang.org/packages/eeue56/elm-xml/latest

It seems the commit is from this year(2017). I think this is what you're looking for!

like image 103
Franzé Jr. Avatar answered Sep 15 '25 18:09

Franzé Jr.


Now apparently there is no package for XML parsing. But maybe you are interested in this project:

https://github.com/toburger/elm-xml-parser

like image 34
FoggyFinder Avatar answered Sep 15 '25 16:09

FoggyFinder