Creates a processing instruction for an XML parser.
Method of dom/Documentdom/Document
Syntaxvar processingInstruction = document.createProcessingInstruction(target, data);
Parameters target
The name of the processing instruction.
dataThe data for the processing instruction.
Return ValueReturns an object of type DOM NodeDOM Node
The created processing instruction.
ExamplesThe 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);
Notes
The createProcessingInstruction method is supported only for XML documents.
Related specificationsMicrosoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4