XMLXMLElements

A collection of XML elements.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

add(
markupTag, xmlContent ​[, withProperties])
 → XMLElement
anyItem(
)
 → XMLElement
count(
)
 → number
item(
index)
 → XMLElement
itemByID(
id)
 → XMLElement
itemByRange(
from, to)
 → XMLElement
lastItem(
)
 → XMLElement
nextItem(
obj)
 → XMLElement
previousItem(
obj)
 → XMLElement
toSource(
)
 → string
add(
markupTag, xmlContent ​[, withProperties])
 → XMLElement
Creates a new XML element.
markupTag The XML tag used to identify the element. Can accept: String or XMLTag.
xmlContent The content to be marked up. Can accept: Text, Story, PageItem, Movie, Sound, Graphic, Table or Cell. (Optional)
withProperties Object Initial values for properties of the new XMLElement (Optional)
anyItem(
)
 → XMLElement
Returns any XMLElement in the collection.
count(
)
 → number
Displays the number of elements in the XMLElement.
everyItem(
)
 → XMLElement
Returns every XMLElement in the collection.
firstItem(
)
 → XMLElement
Returns the first XMLElement in the collection.
item(
index)
 → XMLElement
Returns the XMLElement with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → XMLElement
Returns the XMLElement with the specified ID.
id number The ID.
itemByRange(
from, to)
 → XMLElement
Returns the XMLElements within the specified range.
from The XMLElement, index, or name at the beginning of the range. Can accept: XMLElement, Long Integer or String.
to The XMLElement, index, or name at the end of the range. Can accept: XMLElement, Long Integer or String.
lastItem(
)
 → XMLElement
Returns the last XMLElement in the collection.
middleItem(
)
 → XMLElement
Returns the middle XMLElement in the collection.
nextItem(
obj)
 → XMLElement
Returns the XMLElement whose index follows the specified XMLElement in the collection.
obj XMLElement The XMLElement whose index comes before the desired XMLElement.
previousItem(
obj)
 → XMLElement
Returns the XMLElement with the index previous to the specified index.
obj XMLElement The index of the XMLElement that follows the desired XMLElement.
toSource(
)
 → string
Generates a string which, if executed, will return the XMLElement.