NOTE: the latest version is 3.1.1
Use this module for turning your Elm data into an `Xml` representation that can be either queried or decoded, or turned into a string.
Take a value, then generate a string from it
Encode a string
string "hello" |> encode 0 --> "hello"
Encode an int
int 15 |> encode 0 --> "15"
Encode a float
float 1.576 |> encode 0 --> "1.576"
Encode a bool
bool True |> encode 0 --> "true" bool True |> encode 0 --> "true"
Encode an "object" (a tag)
Empty contents
null |> encode 0 --> ""
Encode a list of nodes, e.g
import Dict list [ object [ ("Root", Dict.empty, null) ], int 5 ] |> encode 0 --> "<Root></Root>\n5"
Take a value, then generate a string from it