Player APIs (BrightScript & Ja...
...
BrightScript Core Objects
roXMLList
21 min
the javascript equivalent to this object is domparser() ifxmllist simplify() as object returns an roxmlelement if the list contains exactly one element otherwise, it will return itself getattributes() as object gettext() as string getchildelements() as object getnamedelements(a as string) as object returns a new xmllist that contains all roxmlelements that match the name of the passed element this action is the same as using the dot operator on an roxmllist getnamedelementsci(a as string) as object iflist count() as integer returns the number of elements in the list resetindex() as boolean resets the current index or position in the list to the head element addtail(obj as object) as void adds a typed value to the tail of the list addhead(obj as object) as void adds a typed value to the head of the list removeindex() as object removes an entry from the list at the current index or position and increments the index or position in the list it returns invalid when the end of the list is reached getindex() as object retrieves an entry from the list at the current index or position and increments the index or position in the list it returns invalid when the end of the list is reached removetail() as object removes the entry at the tail of the list removehead() as object removes the entry at the head of the list gettail() as object retrieves the entry at the tail of the list and keeps the entry in the list gethead() as object retrieves the entry at the head of the list and keeps the entry in the list clear() as void removes all elements from the list ifenum reset() resets the position to the first element of enumeration next() as dynamic returns a typed value at the current position and increment position isnext() as boolean returns true if there is a next element isempty() as boolean returns true if there is not an exact statement ifarray peek() as dynamic returns the last (highest index) array entry without removing it pop() as dynamic returns the last (highest index) entry and removes it from the array push(a as dynamic) adds a new highest index entry to the end of the array shift() as dynamic removes index zero from the array and shifts all other entries down by one unit unshift(a as dynamic) adds a new index zero to the array and shifts all other entries up by one unit delete(a as integer) as boolean deletes the indicated array entry and shifts all above entries down by one unit count() as integer returns the index of the highest entry in the array plus one (i e the length of the array) clear() as void deletes every entry in the array append(a as object) as void appends one roarray to another if the passed roarray contains entries that were never set to a value, they are not appended the two appended objects must be of the same type ifarrayget getentry(a as integer) as dynamic returns an array entry of a given index entries start at zero if an entry that has not been set is fetched, invalid is returned ifarrayset setentry(a as integer, b as dynamic) as void sets an entry of a given index to the passed type value