Document Object Model (DOM) is an API which allows to manage documents structured hierarchically. This model, allows to dispose in memory of a hierarchy display of a XML file (or HTML), providing a set of functions to navigate dynamically through the different nodes that compose the structure and analize them. It is also independent of any programming language oriented to objects. DOM is closely related with SOAP. While the response to a SOAP request always consist in a XML file, the receiving application of the document requires a technologie as DOM to explore it. DOM provides the developers flexibility to analize the file. But the fact that the representation of the document is kept in memory during the processing thereof, implies a cost in terms of occupied memory space and CPU capacity. SAX (Simple API for XML).

1 dom.createElement

Create an element and its childs from a XML structure.

    <xml /> !

Creates a node.

<xsql-script name='dom_createElement'>


        <set name='username'>a</set>
        <set name='password'>b</set>

        <set name='root'>
                 <element name='AuthHeader'>
                        <attribute name='xmlns' value='' />
                        <element name='UserName'>
                        <value><username /></value>
                        <element name='Password'>
                        <value><password /></value>

        It is equivalent to

                &lt;AuthHeader _xmlns="">
                  &lt;Username><username />&lt;/Username>
                  &lt;Password><password />&lt;/Password>