XML parsing library in Erlang
Erlang C Makefile
Latest commit d04d0df Apr 9, 2015 @paulgray Merge pull request #18 from mkurkov/fix/attributes-order
Fix preserve attributes order
Failed to load latest commit information.
c_src Fix issue with NIF resource allocation Sep 15, 2014
include Add protection against including exml.hrl twice. May 15, 2013
src Fix preserve attributes order Apr 7, 2015
test Paginate input to escape functions Feb 24, 2014
CHANGELOG.md Update Changelog for 2.2.2 release Feb 24, 2014
LICENSE Add license Apr 5, 2012
Makefile Fetch rebar when needed - #6 Feb 27, 2012
README.md Updated README to reflect the current API. Mar 30, 2014
rebar.config Add utils lib to exml_escape NIF file Feb 25, 2014



Build Status

exml is an Erlang library helpful with parsing XML streams and doing some basic XML structures manipulation.


exml is a rebar-compatible OTP application, run make or ./rebar compile in order to build it.

As a requirement, development headers for expat library are required.


exml can parse both XML streams as well as single XML documents at once.

To parse a whole XML Document:

{ok, Parser} = exml:parse(<<"<my_xml_doc/>">>).

To generate an XML document from Erlang terms:

Xml = {xmlel,<<"foo">>,
        [{<<"attr1">>,<<"bar">>}], % Attributes
        [{xmlcdata,"Some Value"}] %Elements

Which results in

<foo attr1='bar'>Some Value</foo>

exml:to_binary/1 works similarly.

For an example of using the streaming API, so test/exml_stream_tests.erl