ICI Modules: xml: in-memory document structure


Modules by name : by type

Overview

The stream is returned as an ordered collection of objects. Each is either an element of some kind or character data. Elements themselves contain an ordered collections of nested elements. There is no limit to nesting. Elements also contain a number of attributes which are stored as key/value pairs with both keys and values being strings.

Each element is represented as a struct object with a number of key/value pairs. Element attributes appear as string keys that map to strings storing the value of the attribute as presented in the stream. Element meta-data is stored using non-string keys to avoid clashes with the data stream's choice of names. The keys are integers but could be anything other than strings,

Additionally the "super" of a nested element struct is set to the parent element allowing programs to traverse upwards as well as downwards. Programs need to be careful when setting element attributes that they do not follow the super-struct chain, the standard assign() function should be used in this case.