InDesign2026
API 21.5.1.73
Object

XMLComment

An XML comment.

XMLItem XMLComment
Hierarchy

Document | XMLElement

XMLComment

Properties

NameType AccessDescription
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Number readonly The unique ID of the XMLComment.
Number readonly The index of the XMLComment within its containing object.
Boolean readonly Returns true if the object specifier resolves to valid objects.
Document | XMLElement readonly The parent of the XMLComment (a Document or XMLElement).
Object read/write A property that allows setting of several properties at the same time.
InsertionPoint readonly The insertion point before the table in the story containing the table.
String read/write The text of the XML comment.

Methods

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
XMLComment

Duplicates the XMLComment.

XMLComment[]

Resolves the object specifier, creating an array of object references.

XMLComment

Moves the element to the specified location.

to LocationOptions The location in relation to the reference object or within the containing object.
reference? XMLItem | Text The reference object. Note: Required when the to parameter specifies before or after. . Can accept: XMLItem or Text.
void

Deletes the XMLComment.

Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
void

Selects the object.

existingSelection? SelectionOptions The selection status of the XMLComment in relation to previously selected objects.
String

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

String

Retrieves the object specifier.

Object of 3

Properties elsewhere that hold a XMLComment.

Parameter of 3

Method parameters that accept a XMLComment.

Return 15

Methods that return a XMLComment.