Adobe InDesign CS6 (8.0) Object Model JS: XMLItems

InDesign CS6

Class

XMLItems

 A collection of XML items.

QuickLinks

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

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

XMLItem [] (index: number)
Returns the XMLItem with the specified index.

ParameterTypeDescription
indexnumberThe index.

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: varies)
Returns the XMLItem with the specified index or name.

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
fromLong Integer
String
XMLItem
The XMLItem, index, or name at the beginning of the range. Can accept: XMLItem, Long Integer or String.
toLong Integer
String
XMLItem
The XMLItem, index, or name at the end of the range. Can accept: XMLItem, Long Integer 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

Jongware, 28-Apr-2012 v3.0.3hContents :: Index