Logo Mibo

Xml Module

 The XML front-end. Produces the format-neutral `Node` tree with the
 BCL parser doing all the parsing — no hand-rolled scanning:

 - an element is a node (the tag is the kind); child elements are the
   node's children
 - an attribute is a property — the scalar channel, the way XML means
   it (`map w="36" h="20"`); a node's `Args` stay empty from this
   front-end, and the resolver reads every scalar by property name
 - the value is typed int, then finite float, then word (`x="1"` is a
   number, `place="center"` is a word)
 - an `element` definition carries its template name in the `name`
   attribute (the label)
 - comments and processing instructions are free; text is not markup —
   a non-whitespace text node inside an element fails the parse

 Namespace-free documents: `xmlns` attributes would become plain
 properties. Parse failures carry the parser's line and position.
 This front-end does not track node positions (the BCL line-info
 surface is not reachable from F# without fragile reference tricks),
 so a `Node` from XML carries `Position = -1` and resolution errors
 name the element instead of pointing at a line; KDL documents carry
 real positions.

Functions and values

Function or value Description

parse src

Full Usage: parse src

Parameters:
    src : string

Returns: Result<ImmutableArray<Node>, string>

Parses one XML markup document into its root nodes (one root element; `map` is the usual one). Parse failures carry the parser's line and position.

src : string
Returns: Result<ImmutableArray<Node>, string>

Type something to start searching.