Chapter 3 DynaScript Predefined Objects


DOMProcessingInstruction properties

The DOMProcessingInstruction object inherits all of the properties of the DOMNode object, and has its own properties discussed in this section.

data property

Syntax

DOMProcessingInstruction.data

Description

The content of this processing instruction. This property contains the text beginning at the first non-white space character after the target to the character immediately preceding the ?>.

Example

This processing instruction has a data property of version=1.0 .

<?xml version='1.0' ?>

This instruction writes out the data of the processing instruction that is the first child of the parsed XML document domDoc.

domPI = domDoc.firstChild;
document.writeln( domPI.data );

target property

Syntax

DOMProcessingInstruction.target

Description

The target of this processing instruction. This is the first token following the markup that begins the processing instruction.

Examples

This processing instruction has a target of xml.

<?xml version='1.0' encoding='ISO-8859-1' ?>

This instruction writes out the target of the processing instruction that is the first child of the parsed XML document domDoc.

domPI = domDoc.firstChild;
document.writeln( domPI.target );

 


Copyright © 1999 Sybase, Inc. All rights reserved.