Std.Xml
Std.Xml — read XML safely: parse a document into a tree of nodes.
Types
type Node
type alias Limits = { maxBytes : Int , maxDepth : Int , maxNodes : Int , maxAttributes : Int }
type Mode = Strict | HtmlEntities
Values
attribute : String -> Node -> Maybe String
The value of the attribute with this local name, if the element has one.
attributes : Node -> List ( String, String )
The attributes of an element as `( local name, value )` pairs, in
children : Node -> List Node
Every child node, elements and text, in document order. White space
defaultLimits : Limits
16 MiB, depth 256, 1,000,000 nodes, 256 attributes on one element.
elements : Node -> List Node
The child elements of a node (text left out), in document order.
elementsNamed : String -> Node -> List Node
The child elements with one local name, in document order. O(children).
name : Node -> String
The local name of an element (`"entry"` for `<atom:entry>`); `""` for a
namespace : Node -> String
The namespace URI of an element; `""` when it has none, and for a text
parse : String -> Result Error Node
Parse a document in `Strict` mode under `defaultLimits`. The result is
parseWith : Mode -> Limits -> String -> Result Error Node
Parse with a chosen `Mode` and `Limits`. A limit that is not positive is
text : Node -> String
All the text inside a node and its descendants, concatenated in document