View Source XmlToMap (elixir_xml_to_map v3.1.0)
Simple convenience module for getting a map out of an XML string.
Summary
Functions
naive_map/1
utility is inspired by Rails Hash.from_xml()
but is
"naive" in that it is convenient (requires no setup) but carries the same
drawbacks.
Functions
naive_map/1
utility is inspired by Rails Hash.from_xml()
but is
"naive" in that it is convenient (requires no setup) but carries the same
drawbacks.
For example no validation over what should be a collection. If and only if nodes are repeated at the same level will they become a list. If a node has attributes we'll prepend a "-" in front of them and merge them into the map and take the node value and nest that inside "#content" key.