InDesign2026
API 21.5.1.73
Collection of XMLElement

XMLElements

A collection of XML elements.

Properties

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

Methods

→ XMLElement

Returns the XMLElement with the specified index.

index Number The index.
→ XMLElement

Creates a new XML element.

markupTag String | XMLTag The XML tag used to identify the element. Can accept: String or XMLTag.
xmlContent? Graphic | Movie | PageItem | Sound | Story | Table | Text | Cell The content to be marked up. Can accept: Text, Story, PageItem, Movie, Sound, Graphic, Table or Cell.
withProperties? Object Initial values for properties of the new XMLElement
→ XMLElement

Returns any XMLElement in the collection.

→ Number

Displays the number of elements in the XMLElement.

→ XMLElement[]

Returns every XMLElement in the collection.

→ XMLElement

Returns the first XMLElement in the collection.

→ XMLElement

Returns the XMLElement with the specified index or name.

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

Returns the XMLElement with the specified ID.

id Number The ID.
→ XMLElement

Returns the XMLElement with the specified name.

name String The name.
→ XMLElement[]

Returns the XMLElements within the specified range.

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

Returns the last XMLElement in the collection.

→ XMLElement

Returns the middle XMLElement in the collection.

→ XMLElement

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

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

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

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

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

Object of 2

Properties elsewhere that hold a XMLElements.

Parameter of 1

Method parameters that accept a XMLElements.