Skip to end of metadata
Go to start of metadata

roXMLElement is used to contain an XML tree.

Supported Interfaces

Description

Example:

    <tag1>this is some text</tag1>

Would parse such that:

    Name = "tag1"
    Attributes = invalid
    Body = roString with "this is some text"

Example:

    <emptytag caveman="barney" /> 

Would parse such that:

    Name = "emptytag"
    Attributes = roAssociativeArray, with one entry { caveman: "barney" }
    Body = invalid

If the tag contains other tags, body will be of type roXMLList. 

To generate XML, create an roXMLElement, then use functions like SetName(), AddAttribute(), SetBody(), AddElementWithBody(), AddElement(), AddBodyElement(), and AddText() functions to build the XML object hierarchy.

Then call GenXML() to return the XML as a string.

GenXML() takes one parameter (boolean) that indicates whether the generated xml should have the <?xml …> tag at the top.

Example subroutine to print out the contents of an roXMLElement tree
Example generating XML
Another Example

Is the same as:

 

 

  • No labels