Adobe InDesign CS2 (4.0) Object Model JS: XMLItems

InDesign CS2

Class

XMLItems

 A collection of XML items.

QuickLinks

anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

XMLItem anyItem ()
Returns any XMLItem in the collection.

number count ()
Displays the number of elements in the XMLItem.

Array of XMLItem everyItem ()
Returns every XMLItem in the collection.

XMLItem firstItem ()
Returns the first XMLItem in the collection.

XMLItem item (index: any)
Returns the XMLItem with the specified index or name.

ParameterTypeDescription
indexLong
String
The index or name. Can accept: Long or String.

XMLItem itemByID (id: number)
Returns the XMLItem with the specified ID.

ParameterTypeDescription
idnumberThe ID.

XMLItem itemByName (name: string)
Returns the XMLItem with the specified name.

ParameterTypeDescription
namestringThe name.

Array of XMLItem itemByRange (from: any, to: any)
Returns the XMLItems within the specified range.

ParameterTypeDescription
fromLong
String
XMLItem
The XMLItem, index, or name at the beginning of the range. Can accept: XMLItem, Long or String.
toLong
String
XMLItem
The XMLItem, index, or name at the end of the range. Can accept: XMLItem, Long or String.

XMLItem lastItem ()
Returns the last XMLItem in the collection.

XMLItem middleItem ()
Returns the middle XMLItem in the collection.

XMLItem nextItem (obj: XMLItem)
Returns the XMLItem whose index follows the specified XMLItem in the collection.

ParameterTypeDescription
objXMLItemThe XMLItem whose index comes before the desired XMLItem.

XMLItem previousItem (obj: XMLItem)
Returns the XMLItem with the index previous to the specified index.

ParameterTypeDescription
objXMLItemThe index of the XMLItem that follows the desired XMLItem.

string toSource ()
Generates a string which, if executed, will return the XMLItem.

Element of

Document.xmlItems

XMLElement.xmlItems

XMLItem.xmlItems

Jongware, 27-Jun-2010 v3.0.3dContents :: Index