Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

XML parser for Elm
https://github.com/jinjor/elm-xml-parser

elm parser xml xml-parser

Last synced: about 1 month ago
JSON representation

XML parser for Elm

Awesome Lists containing this project

README

        

XmlParser
====

[![Build Status](https://travis-ci.org/jinjor/elm-xml-parser.svg)](https://travis-ci.org/jinjor/elm-xml-parser)

XML Parser for Elm

## How to use

There is only two functions available.

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

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

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

I'm not going to make decoder and encoder right now. Please let me know if you are interested :)

## LICENSE

BSD-3-Clause