[![Build Status](](

# XmlParser

This parser transforms `XML` to a format that can be consumed by

Currently this parser is just a wrapper around
[Quinn]( parser.

It can be rewritten to gain more performance.

## Installation

The package can be installed as:

  1. Add `xml_parser` to your list of dependencies in `mix.exs`:

    def deps do
      [{:xml_parser, "~> 0.1.0"}]

  2. Ensure `xml_parser` is started before your application:

    def application do
      [applications: [:xml_parser]]

## Usage

xml = "<person id=\"12345\"><first>Josh</first><last>Nussbaum</last></person>"
data = XmlParser.parse xml
# {:person, %{id: 12345}, [{:first, nil, "Josh"}, {:last, nil, "Nussbaum"}]}
# and don't forget to include xml_builder into deps before using it data
# <person id="12345"><first>Josh</first><last>Nussbaum</last></person>

[Documentation]( is also available.

## Gotchas

`Quinn` can't parse XML with siblings on the top level of a document, so XML document must
have only one root element.

  <data>More data!</data>

<bad>Lost data</bad>