[
    {
        "name": "XmlParser",
        "comment": " The XML Parser.\n\n# Types\n@docs Xml, ProcessingInstruction, DocType, DocTypeDefinition, Node, Attribute\n\n# Parse\n@docs parse\n\n# Format\n@docs format\n",
        "unions": [
            {
                "name": "DocTypeDefinition",
                "comment": " DTD (Doc Type Definition)\n\n* Public: `<!DOCTYPE root PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">`\n* System: `<!DOCTYPE root SYSTEM \"foo.xml\">`\n* Custom: `<!DOCTYPE root [ <!ELEMENT ...> ]>`\n\n",
                "args": [],
                "cases": [
                    [
                        "Public",
                        [
                            "String",
                            "String",
                            "Maybe String"
                        ]
                    ],
                    [
                        "System",
                        [
                            "String",
                            "Maybe String"
                        ]
                    ],
                    [
                        "Custom",
                        [
                            "String"
                        ]
                    ]
                ]
            },
            {
                "name": "Node",
                "comment": " Node is either a element such as `<a name=\"value\">foo</a>` or text such as `foo`.\n",
                "args": [],
                "cases": [
                    [
                        "Element",
                        [
                            "String",
                            "List Attribute",
                            "List Node"
                        ]
                    ],
                    [
                        "Text",
                        [
                            "String"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [
            {
                "name": "Attribute",
                "comment": " Attribute such as `name=\"value\"`\n",
                "args": [],
                "type": "{ name : String, value : String }"
            },
            {
                "name": "DocType",
                "comment": " Doc Type Decralation starting with \"<!DOCTYPE\".\n\nThis contains root element name and rest of details as `DocTypeDefinition`.\n\n",
                "args": [],
                "type": "{ rootElementName : String, definition : DocTypeDefinition }"
            },
            {
                "name": "ProcessingInstruction",
                "comment": " Processing Instruction such as `<?xml-stylesheet type=\"text/xsl\" href=\"style.xsl\"?>`.\n\nThe example above is parsed as `{ name = \"xml-stylesheet\", value = \"type=\\\"text/xsl\\\" href=\\\"style.xsl\\\"\" }`.\nThe value (presudo attributes) should be parsed by application.\n\n",
                "args": [],
                "type": "{ name : String, value : String }"
            },
            {
                "name": "Xml",
                "comment": " This represents the entire XML structure.\n\n* processingInstructions: `<?xml-stylesheet type=\"text/xsl\" href=\"style.xsl\"?>`\n* docType: `<!DOCTYPE root SYSTEM \"foo.xml\">`\n* root: `<root><foo/></root>`\n\n",
                "args": [],
                "type": "{ processingInstructions : List ProcessingInstruction, docType : Maybe DocType, root : Node }"
            }
        ],
        "values": [
            {
                "name": "format",
                "comment": " Convert Xml into String.\n\nThis function does NOT insert line breaks or indents for readability.\n\n",
                "type": "Xml -> String"
            },
            {
                "name": "parse",
                "comment": " Parse XML string.\n\n`<?xml ... ?>` and `<!DOCTYPE ... >` is optional so you don't need to ensure them.\n\n```\n> import XmlParser\n> XmlParser.parse \"\"\"<a name=\"value\">foo</a>\"\"\"\nOk { processingInstructions = [], docType = Nothing, root = Element \"a\" ([{ name = \"name\", value = \"value\" }]) ([Text \"foo\"]) }\n```\n\n",
                "type": "String -> Result Error Xml"
            }
        ],
        "binops": []
    }
]