Method Parser.XML.node_to_struct()


Method node_to_struct

mapping(string:string|array|mapping) node_to_struct(.NSTree.NSNode|.Tree.Node rootnode)

Description

XML parsing made easy.

Returns

A hierarchical structure of nested mappings and arrays representing the XML structure starting at rootnode using a minimal depth.

"" : string

The text content of the node.

"/" : mapping

The arguments on this node.

"..." : string

The text content of a simple subnode.

"..." : array

A list of subnodes.

"..." : mapping

A complex subnode (recurse).

Example
Parser.XML.node_to_struct(Parser.XML.NSTree.parse_input("<foo>bar</foo>"));