XMLItem

An XML item.

Methods:

duplicate, move, remove, select

Objects:

DTDs, Number, Object, XMLComments, XMLElements, XMLInstructions, XMLItems

Hierarchy:

Class: XMLItem

Subclasses: XMLElement | XMLComment | XMLInstruction | DTD

Property Listing

Property

Type

Access

Description

dtds

DTDs DTD

readonly

A collection of DTDs.

id

Number

readonly

The unique ID of the XMLItem.

index

Number

readonly

The index of the XMLItem within its containing object.

parent

XMLElement

Document

XMLItem

readonly

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

properties

Object

read/write

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

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

XMLItem duplicate ()

Duplicates the XMLItem.

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

Move element before/after another element or text object, or to beginning/end

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

Location

reference

XMLItem

Text

Before/after this object. Can accept: XMLItem or Text. (Optional)

undefined remove ()

Deletes the XMLItem.

undefined select ([existingSelection:SelectionOptions=SelectionOptions])

Select this object.

Parameter

Type

Description

existingSelection

SelectionOptions

SelectionOptions.ADD_TO

SelectionOptions.REMOVE_FROM

SelectionOptions.REPLACE

How to handle the existing selection (Optional)

(default: SelectionOptions.REPLACE)

Object of

DTD.parent

XMLComment.parent

XMLElement.parent

XMLInstruction.parent

XMLItem.parent

Return

XMLItem.duplicate()