Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 750167 of ProcessingInstruction

  • Revision slug: Web/API/ProcessingInstruction
  • Revision title: ProcessingInstruction
  • Revision id: 750167
  • Created:
  • Creator: fscholz
  • Is current revision? Yes
  • Comment
Tags: 

Revision Content

{{APIRef("DOM")}}

A processing instruction provides an opportunity for application-specific instructions to be embedded within XML and which can be ignored by XML processors which do not support processing their instructions (outside of their having a place in the DOM).

A Processing instruction is distinct from a XML Declaration which is used for other information about the document such as encoding and which appear (if it does) as the first item in the document.

User-defined processing instructions cannot begin with 'xml', as these are reserved (e.g., as used in <?xml-stylesheet ?>).

Also inherits methods and properties from Node.

Attributes

  • target (DOMString) - after the <? and before whitespace delimiting it from data
  • data (DOMString) - first non-whitespace character after target and before ?>

Specification

See also

Revision Source

<p>{{APIRef("DOM")}}</p>

<p>A processing instruction provides an opportunity for application-specific instructions to be embedded within XML and which can be ignored by XML processors which do not support processing their instructions (outside of their having a place in the DOM).</p>

<p>A Processing instruction is distinct from a <a href="/en/XML/XML_Declaration" title="en/XML/XML_Declaration">XML Declaration</a> which is used for other information about the document such as encoding and which appear (if it does) as the first item in the document.</p>

<p>User-defined processing instructions cannot begin with 'xml', as these are reserved (e.g., as used in &lt;?<a href="/en/XML/xml-stylesheet" title="en/XML/xml-stylesheet">xml-stylesheet</a>&nbsp;?&gt;).</p>

<p>Also inherits methods and properties from <a class="internal" href="/en/DOM/Node" title="En/DOM/Node"><code>Node</code></a>.</p>

<h3 id="Attributes" name="Attributes">Attributes</h3>

<ul>
 <li>target (DOMString) - after the <code>&lt;?</code> and before whitespace delimiting it from <code>data</code></li>
 <li>data (DOMString) - first non-whitespace character after <code>target</code> and before <code>?&gt;</code></li>
</ul>

<h3 id="Specification" name="Specification">Specification</h3>

<ul>
 <li><a class="external" href="https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1004215813">DOM Level 1 Core: ProcessingInstruction interface</a></li>
</ul>

<h3 id="See_also" name="See_also">See also</h3>

<ul>
 <li><a href="/en/DOM/document.createProcessingInstruction" title="en/DOM/document.createProcessingInstruction">document.createProcessingInstruction</a></li>
</ul>
Revert to this revision