Chapter 3 DynaScript Predefined Objects
Represents a processing instruction in the XML document.
To use a DOMProcessingInstruction's property:
DOMProcessingInstruction.propertyName
To use a DOMProcessingInstruction's method:
DOMProcessingInstruction.MethodName( parameter )
DOMProcessingInstruction
objects
have all the properties and methods of the DOMNode
object
as well as the properties defined here.
DOMProcessingInstruction.data
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 ?>.
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 );
DOMProcessingInstruction.target
The target of this processing instruction. This is the first token following the markup that begins the processing instruction.
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 © 2001 Sybase, Inc. All rights reserved. |
![]() |