[{"name":"Xml","comment":" The main data structure along with some trivial helpers.\n\n@docs Value\n\n@docs foldl, map\n\n\n# XML/JSON conversion\n\nThis library can convert to and from `Json.Value`.\n\n@docs xmlToJson2, jsonToXml, xmlDecoder\n\n\n# XML character entities\n\nThis library can encode and decode the five predefined XML character entities.\nNumeric character references and other named HTML entities (e.g. `&#x20ac;`\nor `&euro;`) are currently not supported.\nPlease try to use UTF-8 / Unicode instead.\n\n@docs decodeXmlEntities, encodeXmlEntities\n\n","unions":[{"name":"Value","comment":" Representation of the XML tree\n","args":[],"cases":[["Tag",["String.String","Dict.Dict String.String Xml.Value","Xml.Value"]],["StrNode",["String.String"]],["IntNode",["Basics.Int"]],["FloatNode",["Basics.Float"]],["BoolNode",["Basics.Bool"]],["NullNode",[]],["Object",["List.List Xml.Value"]],["DocType",["String.String","Dict.Dict String.String Xml.Value"]]]}],"aliases":[],"values":[{"name":"decodeXmlEntities","comment":" Decode string with XML entities\n\n    decodeXmlEntities \"&lt;hello&gt;\"\n    --> \"<hello>\"\n\n    Do not decode entities twice!\n\n    decodeXmlEntities \"&amp;lt;hello&gt;\"\n    --> \"&lt;hello>\"\n\n","type":"String.String -> String.String"},{"name":"encodeXmlEntities","comment":" Encode string with XML entities\n\n    encodeXmlEntities \"<hello>\"\n    --> \"&lt;hello&gt;\"\n\n","type":"String.String -> String.String"},{"name":"foldl","comment":" Standard foldl\n","type":"(Xml.Value -> a -> a) -> a -> Xml.Value -> a"},{"name":"jsonToXml","comment":" Convert a `Json.Value` into an `Xml.Value`\n\n    import Dict\n    import Json.Encode as Json\n    import Xml exposing (jsonToXml, Value(..))\n\n    jsonToXml (Json.string \"hello\")\n    --> StrNode \"hello\"\n\n    jsonToXml (Json.int 5)\n    --> IntNode 5\n\n    jsonToXml (Json.float 10.5)\n    --> FloatNode 10.5\n\n    jsonToXml (Json.bool True)\n    --> BoolNode True\n\n    jsonToXml (Json.object [(\"name\", Json.string \"hello\")])\n    --> Tag \"name\" Dict.empty (StrNode \"hello\")\n\n    jsonToXml (Json.list identity [Json.string \"name\", Json.string \"hello\"])\n    --> Object [ StrNode \"name\", StrNode \"hello\" ]\n\n    jsonToXml (Json.object [(\"foo\", Json.object [(\"#value\", Json.int 1), (\"@x\", Json.string \"x\")])])\n    --> Tag \"foo\" (Dict.fromList [(\"x\",StrNode \"x\")]) (IntNode 1)\n\n","type":"Json.Encode.Value -> Xml.Value"},{"name":"map","comment":"\n\n    Standard mapping of a value to another value\n\n","type":"(Xml.Value -> Xml.Value) -> Xml.Value -> Xml.Value"},{"name":"xmlDecoder","comment":" A decoder for XML\n","type":"Json.Decode.Decoder Xml.Value"},{"name":"xmlToJson2","comment":" Convert an `Xml.Value` to a `Json.Value`\n\nThe conversion of `Tag`s changed in version 2.0.0, so that they can be properly converted back. The attribute names become JSON keys with \"@\" prepended, and the value becomes a JSON key named \"#value\": <foo x=\"x\">1</foo> becomes {foo: {#value: 1, @x: \"x\"}}\n\nRenamed from xmlToJson to force a bump to version 2.0.\n\n    import Dict\n    import Json.Encode as Json\n    import Xml exposing (jsonToXml, Value(..))\n\n    xmlToJson2 (StrNode \"hello\")\n    --> Json.string \"hello\"\n\n    xmlToJson2 (IntNode 5)\n    --> Json.int 5\n\n    xmlToJson2 (FloatNode 5)\n    --> Json.float 5\n\n    xmlToJson2 (BoolNode True)\n    --> Json.bool True\n\n    xmlToJson2 (Object [ IntNode 5, BoolNode True ])\n    --> Json.list identity [Json.int 5, Json.bool True]\n\n    xmlToJson2 (Tag \"foo\" (Dict.fromList [(\"x\",StrNode \"x\")]) (IntNode 1))\n    --> Json.object [(\"foo\", Json.object [(\"#value\", Json.int 1), (\"@x\", Json.string \"x\")])]\n\n    xmlToJson2 (DocType \"\" Dict.empty)\n    --> Json.null\n\n    xmlToJson2 NullNode\n    --> Json.null\n\n","type":"Xml.Value -> Json.Encode.Value"}],"binops":[]},{"name":"Xml.Decode","comment":"\n\n@docs decode, decodeWith, DecodeSettings, defaultDecodeSettings\n\n@docs decodeInt, decodeFloat, decodeString, decodeBool\n\n@docs decodeChildren\n\n@docs decodeBoolWith, decodeFloatWith, decodeIntWith, decodeNull\n\n","unions":[],"aliases":[{"name":"DecodeSettings","comment":" Settings used by `decodeWith`.\n\nThe `*Values` fields define lists of possible values for the\nrespecitve node types, e.g. `[\"true\", \"True\"]` for `True`.\n\n`parseNumbers` specifies if numbers are parsed to\n`IntNode`/`FloatNode` or just `StrNode`.\n\n","args":[],"type":"{ nullValues : List.List String.String, trueValues : List.List String.String, falseValues : List.List String.String, parseNumbers : Basics.Bool }"}],"values":[{"name":"decode","comment":" Try to decode a string and turn it into an XML value\n\n    import Xml exposing(Value(..))\n    import Xml.Encode exposing (null)\n    import Dict\n\n    decode \"<name></name>\"\n    --> Ok (Object [Tag \"name\" Dict.empty null])\n\n","type":"String.String -> Result.Result String.String Xml.Value"},{"name":"decodeBool","comment":" Decode a bool\n","type":"String.String -> Result.Result String.String Xml.Value"},{"name":"decodeBoolWith","comment":" Decode a bool with settings\n","type":"Xml.Decode.DecodeSettings -> String.String -> Result.Result String.String Xml.Value"},{"name":"decodeChildren","comment":" Decode children from a string\n\n    import Dict\n    import Xml exposing (Value(..))\n\n    decodeChildren defaultDecodeSettings \"<name>hello</name>\"\n    --> Ok (Object [Tag \"name\" Dict.empty (StrNode \"hello\")] )\n\n","type":"Xml.Decode.DecodeSettings -> String.String -> Result.Result String.String Xml.Value"},{"name":"decodeFloat","comment":" Decode a float\n\n    import Xml exposing (Value(..))\n\n    decodeFloat \"hello\"\n    --> Err \"could not convert string 'hello' to a Float\"\n\n    decodeFloat \"5\"\n    --> Ok (FloatNode 5.0)\n\n    decodeFloat \"5.5\"\n    --> Ok (FloatNode 5.5)\n\n","type":"String.String -> Result.Result String.String Xml.Value"},{"name":"decodeFloatWith","comment":" Decode a float with settings\n","type":"Xml.Decode.DecodeSettings -> String.String -> Result.Result String.String Xml.Value"},{"name":"decodeInt","comment":" Decode an int\n\n    import Xml exposing (Value(..))\n\n    decodeInt \"hello\"\n    --> Err \"could not convert string 'hello' to an Int\"\n\n    decodeInt \"5\"\n    --> Ok (IntNode 5)\n\n","type":"String.String -> Result.Result String.String Xml.Value"},{"name":"decodeIntWith","comment":" Decode an int with settings\n","type":"Xml.Decode.DecodeSettings -> String.String -> Result.Result String.String Xml.Value"},{"name":"decodeNull","comment":" Decode a null\n","type":"Xml.Decode.DecodeSettings -> String.String -> Result.Result String.String Xml.Value"},{"name":"decodeString","comment":" Decode a string\n\n    import Xml exposing (Value(..))\n\n    decodeString \"hello\"\n    --> Ok (StrNode \"hello\")\n\n    decodeString \"hello &amp; good bye\"\n    --> Ok (StrNode \"hello & good bye\")\n\n","type":"String.String -> Result.Result String.String Xml.Value"},{"name":"decodeWith","comment":" Try to decode a string and turn it into an XML value\n\n    import Xml exposing(Value(..))\n    import Xml.Encode exposing (null)\n    import Dict\n\n    decode \"<name></name>\"\n    --> Ok (Object [Tag \"name\" Dict.empty null])\n\n","type":"Xml.Decode.DecodeSettings -> String.String -> Result.Result String.String Xml.Value"},{"name":"defaultDecodeSettings","comment":" Good default settings for `DecodeSettings`.\n","type":"Xml.Decode.DecodeSettings"}],"binops":[]},{"name":"Xml.Encode","comment":" Use this module for turning your Elm data into an `Xml`\nrepresentation that can be either queried or decoded, or turned into a\nstring.\n\n@docs encode, encodeWith, EncodeSettings, defaultEncodeSettings\n\n@docs string, int, float, bool, object, null, list\n\n","unions":[],"aliases":[{"name":"EncodeSettings","comment":" Settings used by `encodeWith`.\n\n  - `nullValue`: if not `omitNullTag`, encode a `NullNode` like this.\n  - `omitNullTag`: if `True`, omit a tag if it has no attributes and\n    its only content is a `NullNode`.\n\n","args":[],"type":"{ nullValue : String.String, trueValue : String.String, falseValue : String.String, omitNullTag : Basics.Bool, attributeSingleQuoteInsteadOfDouble : Basics.Bool }"}],"values":[{"name":"bool","comment":" Encode a bool\n\n    bool True |> encode 0\n    --> \"true\"\n\n    bool True |> encode 0\n    --> \"true\"\n\n","type":"Basics.Bool -> Xml.Value"},{"name":"defaultEncodeSettings","comment":" Good default settings for `EncodeSettings`.\n","type":"Xml.Encode.EncodeSettings"},{"name":"encode","comment":" Take a value, then generate a string from it\n","type":"Basics.Int -> Xml.Value -> String.String"},{"name":"encodeWith","comment":" Take a value, then generate a string from it\n","type":"Xml.Encode.EncodeSettings -> Basics.Int -> Xml.Value -> String.String"},{"name":"float","comment":" Encode a float\n\n    float 1.576 |> encode 0\n    --> \"1.576\"\n\n","type":"Basics.Float -> Xml.Value"},{"name":"int","comment":" Encode an int\n\n    int 15 |> encode 0\n    --> \"15\"\n\n","type":"Basics.Int -> Xml.Value"},{"name":"list","comment":" Encode a list of nodes, e.g\n\n    import Dict\n\n    list [ object [ (\"Root\", Dict.empty, null) ], int 5 ] |> encode 0\n    --> \"<Root></Root>\\n5\"\n\n","type":"List.List Xml.Value -> Xml.Value"},{"name":"null","comment":" Empty contents\n\n    null |> encode 0\n    --> \"\"\n\n","type":"Xml.Value"},{"name":"object","comment":" Encode an \"object\" (a tag)\n","type":"List.List ( String.String, Dict.Dict String.String Xml.Value, Xml.Value ) -> Xml.Value"},{"name":"string","comment":" Encode a string\n\n    string \"hello\" |> encode 0\n    --> \"hello\"\n\n    string \"<hello>\" |> encode 0\n    --> \"&lt;hello&gt;\"\n\n","type":"String.String -> Xml.Value"}],"binops":[]},{"name":"Xml.Query","comment":"\n\n\n# Search the parsed XML\n\n@docs tags, contains\n\n@docs tag, collect, default\n\n@docs string, int, float, bool\n\n","unions":[],"aliases":[],"values":[{"name":"bool","comment":" Try to turn a value into an int\n\n    import Xml exposing (Value(..))\n\n    bool (BoolNode True)\n    --> Ok True\n\n    bool (StrNode \"hello\")\n    --> Err \"Not a bool\"\n\n","type":"Xml.Value -> Result.Result String.String Basics.Bool"},{"name":"collect","comment":" Collect as many values that pass the given converter\n\n    import Dict\n    import Xml exposing (Value(..))\n\n    collect (tag \"name\" string) [Tag \"name\" Dict.empty (StrNode \"noah\")]\n    --> [ \"noah\" ]\n\n    collect (tag \"name\" string) [Tag \"name\" Dict.empty (IntNode 5)]\n    --> [ ]\n\n","type":"(Xml.Value -> Result.Result String.String a) -> List.List Xml.Value -> List.List a"},{"name":"contains","comment":" check if a XML value contains another XML value\n","type":"Xml.Value -> Xml.Value -> Basics.Bool"},{"name":"default","comment":"\n\n    Set a default for a result\n        >> default \"Cat\" (Ok \"Fish\")\n\n    Ok \"Fish\"\n        >> default \"Dog\" (Err \"flip\")\n\n    Ok \"Dog\"\n\n","type":"b -> Result.Result a b -> Result.Result a b"},{"name":"float","comment":" Try to turn a value into an int\n\n    import Xml exposing (Value(..))\n\n    float (FloatNode 5.5)\n    --> Ok 5.5\n\n    float (StrNode \"hello\")\n    --> Err \"Not a float\"\n\n","type":"Xml.Value -> Result.Result String.String Basics.Float"},{"name":"int","comment":" Try to turn a value into an int\n\n    import Xml exposing (Value(..))\n\n    int (IntNode 5)\n    --> Ok 5\n\n    int (StrNode \"hello\")\n    --> Err \"Not an int\"\n\n","type":"Xml.Value -> Result.Result String.String Basics.Int"},{"name":"string","comment":" Try to turn a value into a string\n\n    import Xml exposing (Value(..))\n\n    string (IntNode 5)\n    --> Err \"Not a string.\"\n\n    string (StrNode \"hello\")\n    --> Ok \"hello\"\n\n","type":"Xml.Value -> Result.Result String.String String.String"},{"name":"tag","comment":" Try to get a given tag name out from an XML value, then grab the value from that\nGrabs the first tag that matches in the object\n\n    import Dict\n    import Xml exposing (Value(..))\n\n    tag \"name\" string (Tag \"name\" Dict.empty (StrNode \"noah\"))\n    --> Ok \"noah\"\n\n    tag \"name\" string (Tag \"name\" Dict.empty (IntNode 5))\n    --> Err \"Not a string.\"\n\n    tag \"name\" string (StrNode \"noah\")\n    --> Err \"No tag called 'name' found.\"\n\n","type":"String.String -> (Xml.Value -> Result.Result String.String a) -> Xml.Value -> Result.Result String.String a"},{"name":"tags","comment":" Search an XML value for any tags matching\n\n    import Xml exposing (Value(..))\n    import Xml.Encode exposing (object, null, encode)\n    import Dict\n\n    object [ (\"name\", Dict.empty, null)] |> tags \"name\"\n    --> [Tag \"name\" Dict.empty (Object []) ]\n\n","type":"String.String -> Xml.Value -> List.List Xml.Value"}],"binops":[]}]