Xml support in brightscript – BrightSign BrightScript 3.0 Reference Manual User Manual
Page 23

18
Expression Parsing
Any expression that expects a certain type of variable—including Integer, Float, Double, Boolean, or String—can accept
an object with an interface equivalent of that type: ifInt, ifFloat, ifDouble, ifBoolean, ifString.
Array Operator
The array "
[]" operator works with any object that has an ifArray or ifAssociativeArray interface, including arrays,
associative arrays, and lists.
Member Access Operator
The member access operator "
." (
) works with any object that has an ifAssociativeArray interface. It also
works with any object when used to call a member function (i.e. method). It also has special meaning when used on an
roXMLElement or roXMLList object.
XML Support in BrightScript
BrightScript provides XML support with two BrightScript objects and a set of dedicated language features:
roXMLElement
This object provides support for parsing, generating, and containing XML.
roXMLList
This object is used to contain a list of roXMLElement instances.
Dot operator
The
has the following features when used with XML objects:
•
When used with an roXMLElement instance, the Dot Operator returns an roXMLList instance of the child tags that
match the dot operand. If no tags match the operand, an empty list is returned.
•
When applied to an roXMLList instance, the Dot Operator aggregates the results of performing the above operation
on each roXMLElement in the list.