InDesign2026
API 21.5.1.73
Object

XMLAttribute

An XML attribute.

Hierarchy

XMLElement

XMLAttribute

Properties

NameType AccessDescription
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Number readonly The index of the XMLAttribute within its containing object.
Boolean readonly Returns true if the object specifier resolves to valid objects.
String read/write The name of the XMLAttribute.
XMLElement readonly The parent of the XMLAttribute (a XMLElement).
Object read/write A property that allows setting of several properties at the same time.
String read/write The value of the XMLAttribute.

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.
XMLElement

Converts the XML attribute to a child element of its parent element.

located? XMLElementLocation The location of the new XML element within the parent XML element of the XML attribute.
markupTag? XMLTag The XML tag to apply to the new XML element.
XMLAttribute[]

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

void

Deletes the XMLAttribute.

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 XMLAttribute in relation to previously selected objects.
String

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

String

Retrieves the object specifier.

Object of 3

Properties elsewhere that hold a XMLAttribute.

Parameter of 3

Method parameters that accept a XMLAttribute.

Return 14

Methods that return a XMLAttribute.