simple_xml_parser v0.0.1 SimpleXmlParser

The simple parser of xml string to different types

Link to this section Summary

Functions

Convert the input xml string to a map ignoring attributes

Link to this section Functions

Link to this function

xml_to_map(input)

Convert the input xml string to a map ignoring attributes

Examples

Parse an empty object
iex> SimpleXmlParser.xml_to_map("<return i='1'>Hello world!</return>")
%{return: "Hello world!"}

Parse a collection
iex> SimpleXmlParser.xml_to_map("<return><item>1</item><item>2</item></return>")
%{return: %{item: ["1", "2"]}}