Adobe InDesign CS (3.0) Object Model JS: XMLElement

InDesign CS

Class

XMLElement

 An XML element. Base Class: XMLItem

QuickLinks

duplicate, exportFile, importXML, markup, move, placeXML, remove, select, untag, validate

Hierarchy

Document | XMLElement | XMLItem
XMLItem
XMLElement
Character | DTD | EPS | Image | InsertionPoint | Line | PDF | PICT | PageItem | Paragraph | Story | Text | TextColumn | TextStyleRange | WMF | Word | XMLAttribute | XMLComment | XMLElement | XMLInstruction | XMLItem

Properties

PropertyTypeAccessDescription
charactersCharacters readonlyA collection of characters.
contentsSpecialCharactersString r/wThe contents of the text. Can return: String or SpecialCharacters enumerator.
dtdsDTDs readonlyA collection of DTDs.
epssEPSs readonlyA collection of EPS files.
idnumber readonlyThe unique ID of the XMLElement.
imagesImages readonlyA collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).
indexnumber readonlyThe index of the XMLElement within its containing object.
insertionPointsInsertionPoints readonlyA collection of insertion points.
linesLines readonlyA collection of lines.
markupTagString
XMLTag
r/wThe XML tag applied to the element. Can also accept: String.
pageItemsPageItems readonlyThe 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.
paragraphsParagraphs readonlyA collection of paragraphs.
parentDocument
XMLElement
XMLItem
readonlyThe parent of the XMLElement (a Document, XMLElement or XMLItem).
parentStoryStory readonlyThe story that contains the text.
pdfsPDFs readonlyA collection of PDF files.
pictsPICTs readonlyA collection of PICT graphics.
propertiesObject r/wA property that allows setting of several properties at the same time.
storiesStories readonlyA collection of stories.
storyOffsetnumber readonlyThe index of the character containing the table (from the beginning of the story).
textColumnsTextColumns readonlyA collection of text columns.
textStyleRangesTextStyleRanges readonlyA collection of text style ranges.
textsTexts readonlyA collection of text objects.
wmfsWMFs readonlyA collection of WMF graphics.
wordsWords readonlyA collection of words.
xmlAttributesXMLAttributes readonlyA collection of XML attributes.
xmlCommentsXMLComments readonlyA collection of XML comments.
xmlElementsXMLElements readonlyA collection of XML elements.
xmlInstructionsXMLInstructions readonlyA collection of XML instructions.
xmlItemsXMLItems readonlyA collection of XML items.

Methods

Instances

XMLElement duplicate ()
Duplicates the XMLElement.

void exportFile (format: any, to: File[, showingOptions: bool=false][, using: PDFExportPreset])
Exports the object(s) to a file.

ParameterTypeDescription
formatExportFormat
String
The export format. Can accept: ExportFormat enumerator or String.
toFileThe path of the export file.
showingOptionsboolIf true, prompts the user to select export options. (Optional) (default: false)
usingPDFExportPresetThe export style to use. (Optional)

void importXML (from: File)
Imports an XML file.

ParameterTypeDescription
fromFileThe path to the XML file.

void markup (using: any)
Associates the object with the specified XML element while preserving existing content.

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

XMLElement move (to: LocationOptions[, reference: any])
Move element before/after another element or text object, or to beginning/end

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
Location
referenceText
XMLItem
Before/after this object. Can accept: XMLItem or Text. (Optional)

void placeXML (using: any)
Places XML content into the story, replacing the existing content.

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

void remove ()
Deletes the XMLElement.

void select ([existingSelection: SelectionOptions=SelectionOptions.REPLACE])
Select this object.

ParameterTypeDescription
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE
How to handle the existing selection (Optional) (default: SelectionOptions.REPLACE)

void untag ()
Untags an element.

Array of ValidationError validate ([maximumErrors: number=250])
Validates the element against a DTD.

ParameterTypeDescription
maximumErrorsnumberThe maximum number of validation errors to generate. (Optional) (default: 250)

Element of

Button.associatedXMLElement

Character.associatedXMLElements

Character.parent

DTD.parent

Document.associatedXMLElement

EPS.associatedXMLElement

FormField.associatedXMLElement

GraphicLine.associatedXMLElement

Group.associatedXMLElement

Image.associatedXMLElement

InsertionPoint.associatedXMLElements

InsertionPoint.parent

Line.associatedXMLElements

Line.parent

Movie.associatedXMLElement

Oval.associatedXMLElement

PDF.associatedXMLElement

PICT.associatedXMLElement

PageItem.associatedXMLElement

Paragraph.associatedXMLElements

Paragraph.parent

Polygon.associatedXMLElement

Rectangle.associatedXMLElement

Sound.associatedXMLElement

Story.associatedXMLElements

Story.parent

Text.associatedXMLElements

Text.parent

TextColumn.associatedXMLElements

TextColumn.parent

TextFrame.associatedXMLElement

TextStyleRange.associatedXMLElements

TextStyleRange.parent

ValidationError.element

WMF.associatedXMLElement

Word.associatedXMLElements

Word.parent

XMLAttribute.parent

XMLComment.parent

XMLElement.parent

XMLInstruction.parent

XMLItem.parent

Used in:

void Button.markup (using: XMLElement)

void Button.placeXML (using: XMLElement)

void Character.markup (using: XMLElement)

void EPS.markup (using: XMLElement)

void EPS.placeXML (using: XMLElement)

void FormField.markup (using: XMLElement)

void FormField.placeXML (using: XMLElement)

void GraphicLine.markup (using: XMLElement)

void GraphicLine.placeXML (using: XMLElement)

void Group.markup (using: XMLElement)

void Group.placeXML (using: XMLElement)

void Image.markup (using: XMLElement)

void Image.placeXML (using: XMLElement)

void InsertionPoint.markup (using: XMLElement)

void Line.markup (using: XMLElement)

void Movie.markup (using: XMLElement)

void Oval.markup (using: XMLElement)

void Oval.placeXML (using: XMLElement)

void PDF.markup (using: XMLElement)

void PDF.placeXML (using: XMLElement)

void PageItem.markup (using: XMLElement)

void PageItem.placeXML (using: XMLElement)

void Paragraph.markup (using: XMLElement)

void Polygon.markup (using: XMLElement)

void Polygon.placeXML (using: XMLElement)

void Rectangle.markup (using: XMLElement)

void Rectangle.placeXML (using: XMLElement)

void Sound.markup (using: XMLElement)

void Story.markup (using: XMLElement)

void Story.placeXML (using: XMLElement)

void Text.markup (using: XMLElement)

void TextColumn.markup (using: XMLElement)

void TextFrame.markup (using: XMLElement)

void TextFrame.placeXML (using: XMLElement)

void TextStyleRange.markup (using: XMLElement)

void Word.markup (using: XMLElement)

Return

XMLElement DTD.move (to: LocationOptions[, reference: any])

XMLElement XMLComment.move (to: LocationOptions[, reference: any])

XMLElement XMLElement.duplicate ()

XMLElement XMLElement.move (to: LocationOptions[, reference: any])

XMLElement XMLElements.add (markupTag: any[, xmlContent: any][, withProperties: Object])

XMLElement XMLInstruction.move (to: LocationOptions[, reference: any])

XMLElement XMLItem.move (to: LocationOptions[, reference: any])

Jongware, 27-Jun-2010 v3.0.3dContents :: Index