Skip to content

miniBill/elm-xml-parser

 
 

Repository files navigation

XmlParser

Main Workflow

XML Parser for Elm

How to use

There are only two functions available.

parse : String -> Result Parser.Error Xml
format : Xml -> String

Typically, you'll use the parse function, get the root node and traverse it.

> import XmlParser
> XmlParser.parse """<a name="value">foo</a>"""
Ok { processingInstructions = [], docType = Nothing, root = Element "a" ([{ name = "name", value = "value" }]) ([Text "foo"]) }

LICENSE & NOTICE

BSD-3-Clause

Originally developed by jinjor (2017).

This is a fork by miniBill (2022) starting from 2.0.0, aiming:

  • to accept pending fixes, and
  • to change all the recursions with loops for stack safety.

Decoder facilities are already available in elm-xml-decode.

About

XML parser for Elm - fork of jinjor/elm-xml-parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elm 100.0%