Adobe InDesign CS2 (4.0) Object Model JS: XMLAttributes

InDesign CS2

Class

XMLAttributes

 A collection of XML attributes.

QuickLinks

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

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

XMLAttribute add (name: string, value: string[, withProperties: Object])
Creates a new XML attribute.

ParameterTypeDescription
namestringThe name of the attribute.
valuestringThe value of the attribute.
withPropertiesObjectInitial values for properties of the new XMLAttribute (Optional)

XMLAttribute anyItem ()
Returns any XMLAttribute in the collection.

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

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

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

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

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

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

ParameterTypeDescription
namestringThe name.

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

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

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

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

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

ParameterTypeDescription
objXMLAttributeThe XMLAttribute whose index comes before the desired XMLAttribute.

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

ParameterTypeDescription
objXMLAttributeThe index of the XMLAttribute that follows the desired XMLAttribute.

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

Element of

XMLElement.xmlAttributes

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