Adobe InDesign CS6 Server (8.0) Object Model JS: XMLElements

InDesign Server CS6

Class

XMLElements

 A collection of XML elements.

See also XMLElement.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

XMLElement [] (index: number)
Returns the XMLElement with the specified index.

ParameterTypeDescription
indexnumberThe index.

XMLElement add (markupTag: varies[, xmlContent: varies][, withProperties: Object])
Creates a new XML element.

ParameterTypeDescription
markupTagString
XMLTag
The XML tag used to identify the element. Can accept: String or XMLTag.
xmlContentCell
Graphic
Movie
PageItem
Sound
Story
Table
Text
The content to be marked up. Can accept: Text, Story, PageItem, Movie, Sound, Graphic, Table or Cell. (Optional)
withPropertiesObjectInitial values for properties of the new XMLElement (Optional)

XMLElement anyItem ()
Returns any XMLElement in the collection.

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

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

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

XMLElement item (index: varies)
Returns the XMLElement with the specified index or name.

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

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

ParameterTypeDescription
idnumberThe ID.

Array of XMLElement itemByRange (from: varies, to: varies)
Returns the XMLElements within the specified range.

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

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

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

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

ParameterTypeDescription
objXMLElementThe XMLElement whose index comes before the desired XMLElement.

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

ParameterTypeDescription
objXMLElementThe index of the XMLElement that follows the desired XMLElement.

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

Element of

Document.xmlElements

XMLElement.xmlElements

Jongware, 28-Apr-2012 v3.0.3iContents :: Index