Packagecom.adobe.incopy
Classpublic class XMLElement
InheritanceXMLElement Inheritance XMLItem Inheritance CSHostObject Inheritance flash.utils.Proxy

Since : CS5

XMLItem



Public Properties
 PropertyDefined By
  cells : Cells
[read-only] A collection of table cells.
XMLElement
  characters : Characters
[read-only] A collection of characters.
XMLElement
  contents : Object
The contents of the text.
XMLElement
  epss : EPSs
[read-only] A collection of EPS files.
XMLElement
  eventListeners : EventListeners
[override] [read-only] A collection of event listeners.
XMLElement
  events : Events
[override] [read-only] A collection of events.
XMLElement
  graphics : Graphics
[read-only] A collection of imported graphics in any graphic file format (vector, metafile, or bitmap).
XMLElement
 InheritedhostObjectDelegate : HostObject
Getter for the delegate
CSHostObject
  id : Number
[override] [read-only] The unique ID of the XMLElement.
XMLElement
  images : Images
[read-only] A collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).
XMLElement
  index : Number
[override] [read-only] The index of the XMLElement within its containing object.
XMLElement
  insertionPoints : InsertionPoints
[read-only] A collection of insertion points.
XMLElement
  isValid : Boolean
[override] [read-only] Returns true if the object specifier resolves to valid objects.
XMLElement
  lines : Lines
[read-only] A collection of lines.
XMLElement
  markupTag : XMLTag
The XML tag applied to the element.
XMLElement
  pageItems : PageItems
[read-only] The page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.
XMLElement
  paragraphs : Paragraphs
[read-only] A collection of paragraphs.
XMLElement
  parent : Object
[override] [read-only] The parent of the XMLElement (a Document or XMLElement).
XMLElement
  parentStory : Story
[read-only] The story that contains the text.
XMLElement
  pdfs : PDFs
[read-only] A collection of PDF files.
XMLElement
  picts : PICTs
[read-only] A collection of PICT graphics.
XMLElement
  properties : Object
[override] A property that allows setting of several properties at the same time.
XMLElement
  stories : Stories
[read-only] A collection of stories.
XMLElement
  storyOffset : InsertionPoint
[read-only] The insertion point before the table in the story containing the table.
XMLElement
  tables : Tables
[read-only] A collection of tables.
XMLElement
  textColumns : TextColumns
[read-only] A collection of text columns.
XMLElement
  texts : Texts
[read-only] A collection of text objects.
XMLElement
  textStyleRanges : TextStyleRanges
[read-only] A collection of text style ranges.
XMLElement
  wmfs : WMFs
[read-only] A collection of WMF graphics.
XMLElement
  words : Words
[read-only] A collection of words.
XMLElement
  xmlAttributes : XMLAttributes
[read-only] A collection of XML attributes.
XMLElement
  xmlComments : XMLComments
[read-only] A collection of XML comments.
XMLElement
  xmlContent : Object
[read-only] The text content or page item referred to by the element.
XMLElement
  xmlElements : XMLElements
[read-only] A collection of XML elements.
XMLElement
  xmlInstructions : XMLInstructions
[read-only] A collection of XML instructions.
XMLElement
  xmlItems : XMLItems
[read-only] A collection of XML items.
XMLElement
Public Methods
 MethodDefined By
  
addEventListenerXMLElement(eventTypeParam:String = null, handlerParam:Object = null, capturesParam:Boolean = false):EventListener
Adds an event listener.
XMLElement
 Inherited
addEventListenerXMLItem(eventTypeParam:String = null, handlerParam:Object = null, capturesParam:Boolean = false):EventListener
Adds an event listener.
XMLItem
  
applyCellStyle(usingParam:Object = null, clearingOverridesParam:Boolean = true):void
Applies a cell style to the table cells associated with the XMLElement.
XMLElement
  
applyCharacterStyle(usingParam:Object = null):void
Applies the specified character style to the text content of the XMLElement.
XMLElement
  
applyParagraphStyle(usingParam:Object = null, clearingOverridesParam:Boolean = true):void
Applies the specified paragraph style to the text content of the XMLElement.
XMLElement
  
applyTableStyle(usingParam:Object = null, clearingOverridesParam:Boolean = true):void
Applies a table style to the table associated with the XMLElement.
XMLElement
  
changeGrep(reverseOrderParam:Boolean):Object
Finds text that matches the find what value and replaces the text with the change to value.
XMLElement
  
changeText(reverseOrderParam:Boolean):Object
Finds text that matches the find what value and replaces the text with the change to value.
XMLElement
  
changeTransliterate(reverseOrderParam:Boolean):Object
Finds text that matches the find character type value and replaces the text with the change character type value.
XMLElement
  
convertElementToTable(rowTagParam:XMLTag = null, cellTagParam:XMLTag = null):Table
Converts the content of the XML element to a table.
XMLElement
  
convertToAttribute(usingParam:String = null):XMLAttribute
Converts the XMLElement to an attribute of its parent element.
XMLElement
  
[override] Duplicates the XMLElement.
XMLElement
  
evaluateXPathExpression(usingParam:String = null, prefixMappingTableParam:Array = null):Object
Evaluates an XPath expression starting at this XML element in the structure.
XMLElement
 Inherited
filterArgsForHBAPI(args:Array):Array
[static] Function to clean up the argument list and put it into a format that makes sense for HBAPI.
CSHostObject
 Inherited
filterSingleObjectForHBAPI(value:Object):Object
[static]
CSHostObject
  
findGrep(reverseOrderParam:Boolean):Object
Finds text that matches the find what value.
XMLElement
  
findText(reverseOrderParam:Boolean):Object
Finds text that matches the find what value.
XMLElement
  
findTransliterate(reverseOrderParam:Boolean):Object
Finds text that matches the find character type value.
XMLElement
 Inherited
getClassObjectForName(className:String):HostObject
[static] This returns a "Class" object, meaning, a HostObject that can be used to make static function calls or get static properties
CSHostObject
  
getElements():Object
[override] Resolves the object specifier, creating an array of object references.
XMLElement
 Inherited
getSpecialTranslation(className:String, ho:HostObject, expectedReturnType:Class, ownerName:String):*
[static]
CSHostObject
 Inherited
hostCall(name:String, expectedReturnType:Class, rawargs:Array):*
Encapsulates a function call to the host
CSHostObject
 Inherited
hostCallStatic(className:String, methodName:String, expectedReturnType:Class, rawargs:Array):*
[static] Implements a safe call of a static method on the host
CSHostObject
 Inherited
hostGet(name:String, expectedReturnType:Class):*
Encapsulates a property get to the host
CSHostObject
 Inherited
hostGetIndex(idx:Object, expectedReturnType:Class):*
Encapsulates a indexed get to the host
CSHostObject
 Inherited
hostGetStatic(className:String, propertyName:String, expectedReturnType:Class):*
[static] Implements a safe get of a static property on the host Used by for instance, all the enum implementations.
CSHostObject
 Inherited
hostSet(name:String, rawvalue:*):void
Encapsulates a property set to the host
CSHostObject
 Inherited
hostSetStatic(className:String, propertyName:String, rawvalue:*):*
[static] Implements a safe set of a static property on the host
CSHostObject
  
importXML(fromParam:File = null):void
Imports the specified XML file into an InDesign document.
XMLElement
  
insertTextAsContent(usingParam:Object = null, positionParam:XMLElementPosition = null):Text
Inserts the specified text as content before, in, or after the XML element.
XMLElement
 Inherited
isDescendedFrom(clz:Class, ancClass:Class):Boolean
[static] Efficiently determines whether or not one class descends from another in inheritance hierarchy- class relationships are cached by the ClassUtils implementation- (uses org.as3commons lib to quickly discover class hierarchy.
CSHostObject
  
markup(usingParam:Text = null):void
Associates the specified text with an XML element while preserving exisxting content.
XMLElement
  
move(toParam:LocationOptions = null, referenceParam:Object = null):XMLElement
Moves the element to the specified location.
XMLElement
  
placeIntoInlineCopy(copyItemParam:PageItem = null, retainExistingFrameParam:Boolean = false):PageItem
Associates an existing page item with the XML element and places it into an inline frame.
XMLElement
  
placeIntoInlineFrame(dimensionsParam:Array = null):PageItem
Places an XML element into an inline frame.
XMLElement
  
placeXML(usingParam:Story = null):void
Places XML content into a story, replacing the existing content.
XMLElement
  
remove():void
[override] Deletes the XMLElement.
XMLElement
  
removeEventListenerXMLElement(eventTypeParam:String = null, handlerParam:Object = null, capturesParam:Boolean = false):Boolean
Removes the event listener.
XMLElement
 Inherited
removeEventListenerXMLItem(eventTypeParam:String = null, handlerParam:Object = null, capturesParam:Boolean = false):Boolean
Removes the event listener.
XMLItem
 Inherited
replaceDefaultArgs(args:Array, defaultArgs:Array):Array
Function to tidy up arguments prior to call.
CSHostObject
  
select(existingSelectionParam:SelectionOptions = null):void
[override] Selects the object.
XMLElement
  
setContent(usingParam:String = null, relativeBasePathParam:String = null):PageItem
Replaces the content of XML element with content imported from a file.
XMLElement
  
toSpecifier():String
[override] Retrieves the object specifier.
XMLElement
  
untag():void
Untags an element.
XMLElement
  
validate(maximumErrorsParam:Number = 250):Object
Validates the element against a DTD.
XMLElement
 Inherited
wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):*
[static] Method used on static/normal get/ hostcalls
CSHostObject
Protected Methods
 MethodDefined By
 Inherited
createWithArgs(args:Array):void
CSHostObject
 Inherited
hostCreate(args:Array):void
CSHostObject
Property Detail
cellsproperty
cells:Cells  [read-only]

Since : CS5

A collection of table cells.


Implementation
    public function get cells():Cells
charactersproperty 
characters:Characters  [read-only]

Since : CS5

A collection of characters.


Implementation
    public function get characters():Characters
contentsproperty 
contents:Object

Since : CS5

The contents of the text. Can return: String or SpecialCharacters enumerator.


Implementation
    public function get contents():Object
    public function set contents(value:Object):void
epssproperty 
epss:EPSs  [read-only]

Since : CS5

A collection of EPS files.


Implementation
    public function get epss():EPSs
eventListenersproperty 
eventListeners:EventListeners  [read-only] [override]

Since : CS5

A collection of event listeners.


Implementation
    public function get eventListeners():EventListeners
eventsproperty 
events:Events  [read-only] [override]

Since : CS5

A collection of events.


Implementation
    public function get events():Events
graphicsproperty 
graphics:Graphics  [read-only]

Since : CS5

A collection of imported graphics in any graphic file format (vector, metafile, or bitmap).


Implementation
    public function get graphics():Graphics
idproperty 
id:Number  [read-only] [override]

Since : CS5

The unique ID of the XMLElement.


Implementation
    public function get id():Number
imagesproperty 
images:Images  [read-only]

Since : CS5

A collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).


Implementation
    public function get images():Images
indexproperty 
index:Number  [read-only] [override]

Since : CS5

The index of the XMLElement within its containing object.


Implementation
    public function get index():Number
insertionPointsproperty 
insertionPoints:InsertionPoints  [read-only]

Since : CS5

A collection of insertion points.


Implementation
    public function get insertionPoints():InsertionPoints
isValidproperty 
isValid:Boolean  [read-only] [override]

Since : CS5

Returns true if the object specifier resolves to valid objects.


Implementation
    public function get isValid():Boolean
linesproperty 
lines:Lines  [read-only]

Since : CS5

A collection of lines.


Implementation
    public function get lines():Lines
markupTagproperty 
markupTag:XMLTag

Since : CS5

The XML tag applied to the element. Can also accept: String.


Implementation
    public function get markupTag():XMLTag
    public function set markupTag(value:XMLTag):void
pageItemsproperty 
pageItems:PageItems  [read-only]

Since : CS5

The page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.


Implementation
    public function get pageItems():PageItems
paragraphsproperty 
paragraphs:Paragraphs  [read-only]

Since : CS5

A collection of paragraphs.


Implementation
    public function get paragraphs():Paragraphs
parentproperty 
parent:Object  [read-only] [override]

Since : CS5

The parent of the XMLElement (a Document or XMLElement).


Implementation
    public function get parent():Object
parentStoryproperty 
parentStory:Story  [read-only]

Since : CS5

The story that contains the text.


Implementation
    public function get parentStory():Story
pdfsproperty 
pdfs:PDFs  [read-only]

Since : CS5

A collection of PDF files.


Implementation
    public function get pdfs():PDFs
pictsproperty 
picts:PICTs  [read-only]

Since : CS5

A collection of PICT graphics.


Implementation
    public function get picts():PICTs
propertiesproperty 
properties:Object[override]

Since : CS5

A property that allows setting of several properties at the same time.


Implementation
    public function get properties():Object
    public function set properties(value:Object):void
storiesproperty 
stories:Stories  [read-only]

Since : CS5

A collection of stories.


Implementation
    public function get stories():Stories
storyOffsetproperty 
storyOffset:InsertionPoint  [read-only]

Since : CS5

The insertion point before the table in the story containing the table.


Implementation
    public function get storyOffset():InsertionPoint
tablesproperty 
tables:Tables  [read-only]

Since : CS5

A collection of tables.


Implementation
    public function get tables():Tables
textColumnsproperty 
textColumns:TextColumns  [read-only]

Since : CS5

A collection of text columns.


Implementation
    public function get textColumns():TextColumns
textsproperty 
texts:Texts  [read-only]

Since : CS5

A collection of text objects.


Implementation
    public function get texts():Texts
textStyleRangesproperty 
textStyleRanges:TextStyleRanges  [read-only]

Since : CS5

A collection of text style ranges.


Implementation
    public function get textStyleRanges():TextStyleRanges
wmfsproperty 
wmfs:WMFs  [read-only]

Since : CS5

A collection of WMF graphics.


Implementation
    public function get wmfs():WMFs
wordsproperty 
words:Words  [read-only]

Since : CS5

A collection of words.


Implementation
    public function get words():Words
xmlAttributesproperty 
xmlAttributes:XMLAttributes  [read-only]

Since : CS5

A collection of XML attributes.


Implementation
    public function get xmlAttributes():XMLAttributes
xmlCommentsproperty 
xmlComments:XMLComments  [read-only]

Since : CS5

A collection of XML comments.


Implementation
    public function get xmlComments():XMLComments
xmlContentproperty 
xmlContent:Object  [read-only]

Since : CS5

The text content or page item referred to by the element. Can return: Text, Story, PageItem, Movie, Sound, Graphic, Table or Cell.


Implementation
    public function get xmlContent():Object
xmlElementsproperty 
xmlElements:XMLElements  [read-only]

Since : CS5

A collection of XML elements.


Implementation
    public function get xmlElements():XMLElements
xmlInstructionsproperty 
xmlInstructions:XMLInstructions  [read-only]

Since : CS5

A collection of XML instructions.


Implementation
    public function get xmlInstructions():XMLInstructions
xmlItemsproperty 
xmlItems:XMLItems  [read-only]

Since : CS5

A collection of XML items.


Implementation
    public function get xmlItems():XMLItems
Method Detail
addEventListenerXMLElement()method
public function addEventListenerXMLElement(eventTypeParam:String = null, handlerParam:Object = null, capturesParam:Boolean = false):EventListener

Since : CS5

Adds an event listener.

Parameters

eventTypeParam:String (default = null) — (String) The event type.
 
handlerParam:Object (default = null) — (Object) The event handler. Can accept: File or JavaScript Function.
 
capturesParam:Boolean (default = false) — (Boolean) This parameter is obsolete. (Optional)

Returns
EventListener
applyCellStyle()method 
public function applyCellStyle(usingParam:Object = null, clearingOverridesParam:Boolean = true):void

Since : CS5

Applies a cell style to the table cells associated with the XMLElement.

Parameters

usingParam:Object (default = null) — (Object) The cell style to apply. Can accept: String or CellStyle.
 
clearingOverridesParam:Boolean (default = true) — (Boolean) If true, removes local formatting before applying the cell style. (Optional)

applyCharacterStyle()method 
public function applyCharacterStyle(usingParam:Object = null):void

Since : CS5

Applies the specified character style to the text content of the XMLElement.

Parameters

usingParam:Object (default = null) — (Object) The character style to apply. Can accept: String or CharacterStyle.

applyParagraphStyle()method 
public function applyParagraphStyle(usingParam:Object = null, clearingOverridesParam:Boolean = true):void

Since : CS5

Applies the specified paragraph style to the text content of the XMLElement.

Parameters

usingParam:Object (default = null) — (Object) The paragraph style to apply. Can accept: String or ParagraphStyle.
 
clearingOverridesParam:Boolean (default = true) — (Boolean) If true, clears any attributes before applying the style. (Optional)

applyTableStyle()method 
public function applyTableStyle(usingParam:Object = null, clearingOverridesParam:Boolean = true):void

Since : CS5

Applies a table style to the table associated with the XMLElement.

Parameters

usingParam:Object (default = null) — (Object) The table style to apply. Can accept: String or TableStyle.
 
clearingOverridesParam:Boolean (default = true) — (Boolean) If true, removes local formatting before applying the table style. (Optional)

changeGrep()method 
public function changeGrep(reverseOrderParam:Boolean):Object

Since : CS5

Finds text that matches the find what value and replaces the text with the change to value.

Parameters

reverseOrderParam:Boolean (default = NaN) — (Boolean) If true, returns the results in reverse order. (Optional)

Returns
Object
changeText()method 
public function changeText(reverseOrderParam:Boolean):Object

Since : CS5

Finds text that matches the find what value and replaces the text with the change to value.

Parameters

reverseOrderParam:Boolean (default = NaN) — (Boolean) If true, returns the results in reverse order. (Optional)

Returns
Object
changeTransliterate()method 
public function changeTransliterate(reverseOrderParam:Boolean):Object

Since : CS5

Finds text that matches the find character type value and replaces the text with the change character type value.

Parameters

reverseOrderParam:Boolean (default = NaN) — (Boolean) If true, returns the results in reverse order. (Optional)

Returns
Object
convertElementToTable()method 
public function convertElementToTable(rowTagParam:XMLTag = null, cellTagParam:XMLTag = null):Table

Since : CS5

Converts the content of the XML element to a table.

Parameters

rowTagParam:XMLTag (default = null) — (XMLTag) The XML tag that indicates a table row.
 
cellTagParam:XMLTag (default = null) — (XMLTag) The XML tag that indicates a table cell.

Returns
Table
convertToAttribute()method 
public function convertToAttribute(usingParam:String = null):XMLAttribute

Since : CS5

Converts the XMLElement to an attribute of its parent element.

Parameters

usingParam:String (default = null) — (String) The name to give to the new attribute. (Optional)

Returns
XMLAttribute
duplicate()method 
override public function duplicate():XMLItem

Since : CS5

Duplicates the XMLElement.

Returns
XMLItem
evaluateXPathExpression()method 
public function evaluateXPathExpression(usingParam:String = null, prefixMappingTableParam:Array = null):Object

Since : CS5

Evaluates an XPath expression starting at this XML element in the structure.

Parameters

usingParam:String (default = null) — (String) The XPath expression.
 
prefixMappingTableParam:Array (default = null) — (Array) The namespace mapping table. Can accept: Array of Arrays of 2 Strings. (Optional)

Returns
Object
findGrep()method 
public function findGrep(reverseOrderParam:Boolean):Object

Since : CS5

Finds text that matches the find what value.

Parameters

reverseOrderParam:Boolean (default = NaN) — (Boolean) If true, returns the results in reverse order. (Optional)

Returns
Object
findText()method 
public function findText(reverseOrderParam:Boolean):Object

Since : CS5

Finds text that matches the find what value.

Parameters

reverseOrderParam:Boolean (default = NaN) — (Boolean) If true, returns the results in reverse order. (Optional)

Returns
Object
findTransliterate()method 
public function findTransliterate(reverseOrderParam:Boolean):Object

Since : CS5

Finds text that matches the find character type value.

Parameters

reverseOrderParam:Boolean (default = NaN) — (Boolean) If true, returns the results in reverse order. (Optional)

Returns
Object
getElements()method 
override public function getElements():Object

Since : CS5

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

Returns
Object
importXML()method 
public function importXML(fromParam:File = null):void

Since : CS5

Imports the specified XML file into an InDesign document.

Parameters

fromParam:File (default = null) — (File) The XML file.

insertTextAsContent()method 
public function insertTextAsContent(usingParam:Object = null, positionParam:XMLElementPosition = null):Text

Since : CS5

Inserts the specified text as content before, in, or after the XML element.

Parameters

usingParam:Object (default = null) — (Object) The text to be inserted. Can accept: String or SpecialCharacters enumerator.
 
positionParam:XMLElementPosition (default = null) — (XMLElementPosition) The position at which to insert the text. Note that text inserted before or after the element does not become part of the content of the element. Instead, it becomes content of the parent of the element.

Returns
Text
markup()method 
public function markup(usingParam:Text = null):void

Since : CS5

Associates the specified text with an XML element while preserving exisxting content.

Parameters

usingParam:Text (default = null) — (Text) The text to mark up.

move()method 
public function move(toParam:LocationOptions = null, referenceParam:Object = null):XMLElement

Since : CS5

Moves the element to the specified location.

Parameters

toParam:LocationOptions (default = null) — (LocationOptions) The location in relation to the reference object or within the containing object.
 
referenceParam:Object (default = null) — (Object) The reference object. Note: Required when the to parameter specifies before or after. . Can accept: XMLItem or Text. (Optional)

Returns
XMLElement
placeIntoInlineCopy()method 
public function placeIntoInlineCopy(copyItemParam:PageItem = null, retainExistingFrameParam:Boolean = false):PageItem

Since : CS5

Associates an existing page item with the XML element and places it into an inline frame.

Parameters

copyItemParam:PageItem (default = null) — (PageItem) The page item to copy.
 
retainExistingFrameParam:Boolean (default = false) — (Boolean) If true, moves the existing page item. If false, moves a copy of the page item. (Optional)

Returns
PageItem
placeIntoInlineFrame()method 
public function placeIntoInlineFrame(dimensionsParam:Array = null):PageItem

Since : CS5

Places an XML element into an inline frame.

Parameters

dimensionsParam:Array (default = null) — (Array) The dimensions of the inline frame in the format [width, height].

Returns
PageItem
placeXML()method 
public function placeXML(usingParam:Story = null):void

Since : CS5

Places XML content into a story, replacing the existing content.

Parameters

usingParam:Story (default = null) — (Story) The story to associate with the XML element.

remove()method 
override public function remove():void

Since : CS5

Deletes the XMLElement.

removeEventListenerXMLElement()method 
public function removeEventListenerXMLElement(eventTypeParam:String = null, handlerParam:Object = null, capturesParam:Boolean = false):Boolean

Since : CS5

Removes the event listener.

Parameters

eventTypeParam:String (default = null) — (String) The registered event type.
 
handlerParam:Object (default = null) — (Object) The registered event handler. Can accept: File or JavaScript Function.
 
capturesParam:Boolean (default = false) — (Boolean) This parameter is obsolete. (Optional)

Returns
Boolean
select()method 
override public function select(existingSelectionParam:SelectionOptions = null):void

Since : CS5

Selects the object.

Parameters

existingSelectionParam:SelectionOptions (default = null) — (SelectionOptions) The selection status of the XMLElement in relation to previously selected objects. (Optional)

setContent()method 
public function setContent(usingParam:String = null, relativeBasePathParam:String = null):PageItem

Since : CS5

Replaces the content of XML element with content imported from a file.

Parameters

usingParam:String (default = null) — (String) The file path to the import file.
 
relativeBasePathParam:String (default = null) — (String) Base path used to resolve relative paths. (Optional)

Returns
PageItem
toSpecifier()method 
override public function toSpecifier():String

Since : CS5

Retrieves the object specifier.

Returns
String
untag()method 
public function untag():void

Since : CS5

Untags an element.

validate()method 
public function validate(maximumErrorsParam:Number = 250):Object

Since : CS5

Validates the element against a DTD.

Parameters

maximumErrorsParam:Number (default = 250) — (Number) The maximum number of validation errors to generate. (Optional)

Returns
Object