A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/Document/createProcessingInstruction below:

createProcessingInstruction ยท WebPlatform Docs

createProcessingInstruction Summary

Creates a processing instruction for an XML parser.

Method of dom/Documentdom/Document

Syntax
var processingInstruction = document.createProcessingInstruction(target, data);
Parameters target
Data-type
String

The name of the processing instruction.

data
Data-type
String

The data for the processing instruction.

Return Value

Returns an object of type DOM NodeDOM Node

The created processing instruction.

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);
Notes

The createProcessingInstruction method is supported only for XML documents.

Related specifications
DOM Level 3 Core
Recommendation
Attributions

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