EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

createProcessingInstruction method

Creates a processing instruction for an XML parser.

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

Syntax

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

Parameters

bstrTarget [in]

Type: String

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

bstrData [in]

Type: String

A String value that contains the data for 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

 

 

Mostrar:
© 2014 Microsoft