The package can help to parse complex xml structures into internal Elixir data types.
iex> SimpleXmlParser.xml_to_map("<return i='1'>Hello world!</return>")
%{return: "Hello world!"}
iex> SimpleXmlParser.xml_to_map("<return><item>1</item><item>2</item></return>")
%{return: %{item: ["1", "2"]}}
You can find more examples in method documentation.
- Simple maps
- Attribute support
- Think about source formation
- Benchmarks and optimization
If available in Hex, the package can be installed
by adding simple_xml_parser
to your list of dependencies in mix.exs
:
def deps do
[
{:simple_xml_parser, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/simple_xml_parser.