XMLElement

An XML element.

Methods:

duplicate, exportFile, getElements, importXML, markup, move, placeXML, remove, select, store, toSource, toSpecifier, untag, validate

Objects:

Cells, Characters, DTDs, EPSs, Images, InsertionPoints, Lines, Number, Object, PDFs, PICTs, PageItems, Paragraphs, SpecialCharacters, Stories, Story, String, Tables, TextColumns, TextStyleRanges, Texts, WMFs, Words, XMLAttributes, XMLComments, XMLElements, XMLInstructions, XMLItems, XMLTag

Hierarchy:

Superclass: XMLItem

Class: XMLElement

Property Listing

Property

Type

Access

Description

cells

Cells Cell

readonly

A collection of table cells.

characters

Characters Character

readonly

A collection of characters.

contents

String

SpecialCharacters

SpecialCharacters.AUTO_PAGE_NUMBER

SpecialCharacters.BULLET_CHARACTER

SpecialCharacters.COLUMN_BREAK

SpecialCharacters.COPYRIGHT_SYMBOL

SpecialCharacters.DEGREE_SYMBOL

SpecialCharacters.DISCRETIONARY_HYPHEN

SpecialCharacters.DOUBLE_LEFT_QUOTE

SpecialCharacters.DOUBLE_RIGHT_QUOTE

SpecialCharacters.ELLIPSIS_CHARACTER

SpecialCharacters.EM_DASH

SpecialCharacters.EM_SPACE

SpecialCharacters.END_NESTED_STYLE

SpecialCharacters.EN_DASH

SpecialCharacters.EN_SPACE

SpecialCharacters.EVEN_PAGE_BREAK

SpecialCharacters.FIGURE_SPACE

SpecialCharacters.FLUSH_SPACE

SpecialCharacters.FOOTNOTE_SYMBOL

SpecialCharacters.FORCED_LINE_BREAK

SpecialCharacters.FRAME_BREAK

SpecialCharacters.HAIR_SPACE

SpecialCharacters.INDENT_HERE_TAB

SpecialCharacters.NEXT_PAGE_NUMBER

SpecialCharacters.NONBREAKING_HYPHEN

SpecialCharacters.NONBREAKING_SPACE

SpecialCharacters.ODD_PAGE_BREAK

SpecialCharacters.PAGE_BREAK

SpecialCharacters.PARAGRAPH_SYMBOL

SpecialCharacters.PREVIOUS_PAGE_NUMBER

SpecialCharacters.PUNCTUATION_SPACE

SpecialCharacters.REGISTERED_TRADEMARK

SpecialCharacters.RIGHT_INDENT_TAB

SpecialCharacters.SECTION_MARKER

SpecialCharacters.SECTION_SYMBOL

SpecialCharacters.SINGLE_LEFT_QUOTE

SpecialCharacters.SINGLE_RIGHT_QUOTE

SpecialCharacters.THIN_SPACE

SpecialCharacters.TRADEMARK_SYMBOL

read/write

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

dtds

DTDs DTD

readonly

A collection of DTDs.

epss

EPSs EPS

readonly

A collection of EPS files.

id

Number

readonly

The unique ID of the XMLElement.

images

Images Image

readonly

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

index

Number

readonly

The index of the XMLElement within its containing object.

insertionPoints

InsertionPoints InsertionPoint

readonly

A collection of insertion points.

lines

Lines Line

readonly

A collection of lines.

markupTag

XMLTag

String

read/write

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

pageItems

PageItems PageItem

readonly

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.

paragraphs

Paragraphs Paragraph

readonly

A collection of paragraphs.

parent

XMLElement

Document

XMLItem

readonly

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

parentStory

Story

readonly

The story that contains the text.

pdfs

PDFs PDF

readonly

A collection of PDF files.

picts

PICTs PICT

readonly

A collection of PICT graphics.

properties

Object

read/write

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

stories

Stories Story

readonly

A collection of stories.

storyOffset

Number

readonly

The index of the character containing the table (from the beginning of the story).

tables

Tables Table

readonly

A collection of tables.

textColumns

TextColumns TextColumn

readonly

A collection of text columns.

textStyleRanges

TextStyleRanges TextStyleRange

readonly

A collection of text style ranges.

texts

Texts Text

readonly

A collection of text objects.

wmfs

WMFs WMF

readonly

A collection of WMF graphics.

words

Words Word

readonly

A collection of words.

xmlAttributes

XMLAttributes XMLAttribute

readonly

A collection of XML attributes.

xmlComments

XMLComments XMLComment

readonly

A collection of XML comments.

xmlElements

XMLElements XMLElement

readonly

A collection of XML elements.

xmlInstructions

XMLInstructions XMLInstruction

readonly

A collection of XML instructions.

xmlItems

XMLItems XMLItem

readonly

A collection of XML items.

Method Listing

XMLElement duplicate ()

Duplicates the XMLElement.

undefined exportFile (format:Varies ExportFormat String, to:File, [showingOptions:Boolean=Boolean], using:PDFExportPreset)

Exports the object(s) to a file.

Parameter

Type

Description

format

ExportFormat

ExportFormat.EPS_TYPE

ExportFormat.INCOPY

ExportFormat.INCOPY_CS2_STORY

ExportFormat.INDESIGN_INTERCHANGE

ExportFormat.INDESIGN_SNIPPET

ExportFormat.JPG

ExportFormat.PDF_TYPE

ExportFormat.RTF

ExportFormat.SVG

ExportFormat.SVG_COMPRESSED

ExportFormat.TAGGED_TEXT

ExportFormat.TEXT_TYPE

ExportFormat.XML

String

The export format. Can accept: ExportFormat enumerator or String.

to

File

The path of the export file.

showingOptions

Boolean

If true, prompts the user to select export options. (Optional)

(default: false)

using

PDFExportPreset

The export style to use. (Optional)

Object getElements ()

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

undefined importXML (from:File)

Imports an XML file.

Parameter

Type

Description

from

File

The path to the XML file.

undefined markup (using:Varies Story Text PageItem)

Associates the object with the specified XML element while preserving existing content.

Parameter

Type

Description

using

Story

Text

PageItem

The object to mark up. Can accept: Text, Story or PageItem.

XMLElement move (to:LocationOptions, reference:Varies XMLItem Text)

Moves the element to the specified location.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

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. (Optional)

undefined placeXML (using:Varies Story PageItem)

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

Parameter

Type

Description

using

Story

PageItem

The story into which to place the XML content. Can accept: Story or PageItem.

undefined remove ()

Deletes the XMLElement.

undefined select ([existingSelection:SelectionOptions=SelectionOptions])

Selects the object.

Parameter

Type

Description

existingSelection

SelectionOptions

SelectionOptions.ADD_TO

SelectionOptions.REMOVE_FROM

SelectionOptions.REPLACE_WITH

The selection status of the XMLElement in relation to previously selected objects. (Optional)

(default: SelectionOptions.REPLACE_WITH)

Asset store (using:Library)

Store a page item in a library

Parameter

Type

Description

using

Library

The library in which to store

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

undefined untag ()

Untags an element.

ValidationError validate ([maximumErrors:Number=Number])

Validates the element against a DTD.

Parameter

Type

Description

maximumErrors

Number

The maximum number of validation errors to generate. (Optional)

(default: 250)

Object of

ValidationError.element

Cell.parent

Character.parent

DTD.parent

EPS.parent

Image.parent

InsertionPoint.parent

Line.parent

PDF.parent

PICT.parent

PageItem.parent

Paragraph.parent

Story.parent

Table.parent

Text.parent

TextColumn.parent

TextStyleRange.parent

WMF.parent

Word.parent

XMLAttribute.parent

XMLComment.parent

XMLElement.parent

XMLInstruction.parent

XMLItem.parent

Return

XMLElements.add()

XMLElement.duplicate()

XMLElement.move()

XMLElements.anyItem()

XMLElements.everyItem()

XMLElements.nextItem()

XMLElements.previousItem()

XMLElements.itemByID()

XMLElements.item()

XMLElements.itemByName()

XMLElements.itemByRange()

XMLElements.firstItem()

XMLElements.lastItem()

XMLElements.middleItem()