Decode a int import Xml exposing (Value(IntNode))
decodeInt "hello"
--> Err "could not convert string 'hello' to an Int"
decodeInt "5"
--> Ok (IntNode 5)Decode a float import Xml exposing (Value(FloatNode))
decodeFloat "hello"
--> Err "could not convert string 'hello' to a Float"
decodeFloat "5"
--> Ok (FloatNode 5.0)
decodeFloat "5.5"
--> Ok (FloatNode 5.5)Decode a string
import Xml exposing (Value(StrNode))
decodeString "hello"
--> Ok (StrNode "hello")Decode a string
import Xml exposing (Value(StrNode))
decodeString "hello"
--> Ok (StrNode "hello")Decode a bool
Decode children from a string
import Xml exposing (Value(Object, Tag, StrNode))
decodeChildren "<name>hello</name>"
--> Ok (Object [Tag "name" Dict.empty (StrNode "hello")] )
Try to decode a string and turn it into an XML value import Xml exposing(Value(Tag, Object)) import Xml.Encode exposing (null) import Dict