Adobe InDesign CS2 (4.0) Object Model JS: XMLComments

InDesign CS2

Class

XMLComments

 A collection of XML comments.

QuickLinks

add, 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

XMLComment add ([value: string=][, storyOffset: any][, withProperties: Object])
Creates a new XML comment.

ParameterTypeDescription
valuestringThe value of the comment. (Optional) (default: )
storyOffsetInsertionPoint
Long
The location within the story, specified as an insertion point. Can accept: InsertionPoint or Long. (Optional)
withPropertiesObjectInitial values for properties of the new XMLComment (Optional)

XMLComment anyItem ()
Returns any XMLComment in the collection.

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

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

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

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

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

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

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

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

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

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

ParameterTypeDescription
objXMLCommentThe XMLComment whose index comes before the desired XMLComment.

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

ParameterTypeDescription
objXMLCommentThe index of the XMLComment that follows the desired XMLComment.

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

Element of

Document.xmlComments

XMLElement.xmlComments

XMLItem.xmlComments

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