Chapter 3 DynaScript Predefined Objects
The DOMProcessingInstruction
object inherits
all of the properties of the DOMNode
object, and
has its own properties discussed in this section.
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 © 1999 Sybase, Inc. All rights reserved. |
![]() |