go
Expand Minimize
This topic has not yet been rated - Rate this topic

createProcessingInstruction method

Creates a processing instruction for an XML parser.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4Internet Explorer 9

Syntax

var newProcessingInstruction = document.createProcessingInstruction(bstrTarget, bstrData);

Parameters

bstrTarget [in]

Type: BSTR

A String value that contains the name of the processing instruction.

bstrData [in]

Type: BSTR

A String value that contains the data for the processing instruction.

newProcessingInstruction [out, retval]

Type: IDOMProcessingInstruction

Returns a reference to the processing instruction.

Return value

Type: IDOMProcessingInstruction

Returns a reference to the processing instruction.

Standards information

Remarks

The createProcessingInstruction method is supported only for XML documents.

Examples

The following code example demonstrates how to create an XML processing instruction.


// This example creates the following processing instruction:
//   <?xml-stylesheet type="text/css" href="style.css">
var sTarget = 'xml-stylesheet';
var sData = 'type="text/css" href="style.css"';'
var obj = document.createProcessingInstruction( sTarget, sData );


See also

document

 

 

Send comments about this topic to Microsoft

Build date: 11/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.