InDesign2026
API 21.5.1.73
Collection of XMLComment

XMLComments

A collection of XML comments.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

→ XMLComment

Returns the XMLComment with the specified index.

index Number The index.
→ XMLComment

Creates a new XML comment.

value? String The value of the comment.
storyOffset? InsertionPoint | LongInteger The location within the story, specified as an insertion point. Can accept: InsertionPoint or Long Integer.
withProperties? Object Initial values for properties of the new XMLComment
→ XMLComment

Returns any XMLComment in the collection.

→ Number

Displays the number of elements in the XMLComment.

→ XMLComment[]

Returns every XMLComment in the collection.

→ XMLComment

Returns the first XMLComment in the collection.

→ XMLComment

Returns the XMLComment with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
→ XMLComment

Returns the XMLComment with the specified ID.

id Number The ID.
→ XMLComment[]

Returns the XMLComments within the specified range.

from LongInteger | XMLComment | String The XMLComment, index, or name at the beginning of the range. Can accept: XMLComment, Long Integer or String.
to LongInteger | XMLComment | String The XMLComment, index, or name at the end of the range. Can accept: XMLComment, Long Integer or String.
→ XMLComment

Returns the last XMLComment in the collection.

→ XMLComment

Returns the middle XMLComment in the collection.

→ XMLComment

Returns the XMLComment whose index follows the specified XMLComment in the collection.

obj XMLComment The XMLComment whose index comes before the desired XMLComment.
→ XMLComment

Returns the XMLComment with the index previous to the specified index.

obj XMLComment The index of the XMLComment that follows the desired XMLComment.
→ String

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

Object of 2

Properties elsewhere that hold a XMLComments.