The main data structure along with some trivial helpers.
Standard foldl
Standard mapping of a value to another valueConvert an Xml.Value to a Json.Value
>>> import Dict
>>> import Json.Encode as Json
>>> xmlToJson (StrNode "hello")
Json.string "hello"
>>> xmlToJson (IntNode 5)
Json.int 5
>>> xmlToJson (FloatNode 5)
Json.float 5
>>> xmlToJson (BoolNode True)
Json.bool True
>>> xmlToJson (Object [ IntNode 5, BoolNode True ])
Json.list [Json.int 5, Json.bool True]
>>> xmlToJson (DocType "" Dict.empty)
Json.null
Representation of the XML tree