XMLRuleProcessor

An XML rule processor.

Methods:

addEventListener, endProcessingRuleSet, extractLabel, findNextMatch, getElements, halt, insertLabel, remove, removeEventListener, skipChildren, startProcessingRuleSet, startProcessingSubtree, toSource, toSpecifier

Objects:

Boolean, EventListeners, Events, Number, Object, String

Property Listing

Property

Type

Access

Description

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

halted

Boolean

readonly

If true, the XML rule process has halted.

id

Number

readonly

The unique ID of the XMLRuleProcessor.

index

Number

readonly

The index of the XMLRuleProcessor within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

name

String

read/write

The name of the XMLRuleProcessor; this is an alias to the XMLRuleProcessor's label property.

parent

Application

readonly

The parent of the XMLRuleProcessor (a Application).

properties

Object

read/write

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

rulePaths

Array of String

readonly

The XPath condition paths of the rules in the rule set.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined endProcessingRuleSet ()

Stop processing XML rule set.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

XMLRuleMatchData findNextMatch ()

Finds the next matching XML element.

XMLRuleProcessor getElements ()

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

undefined halt ()

Halt the XML rule processor.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

undefined remove ()

Deletes the XMLRuleProcessor.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined skipChildren ()

Do not process XML elements (children) of the current XML element.

XMLRuleMatchData startProcessingRuleSet (initialElement:XMLElement)

Start processing an XML rule set.

Parameter

Type

Description

initialElement

XMLElement

The XML element at which to start processing the rule set.

XMLRuleMatchData startProcessingSubtree ()

Process the XML elements of the current XML element.

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

XMLRuleMatchData.parent

Return

XMLRuleProcessors.add()

XMLRuleProcessor.getElements()

XMLRuleProcessors.anyItem()

XMLRuleProcessors.everyItem()

XMLRuleProcessors.nextItem()

XMLRuleProcessors.previousItem()

XMLRuleProcessors.itemByID()

XMLRuleProcessors.item()

XMLRuleProcessors.[]()

XMLRuleProcessors.itemByName()

XMLRuleProcessors.itemByRange()

XMLRuleProcessors.firstItem()

XMLRuleProcessors.lastItem()

XMLRuleProcessors.middleItem()