---
title: Processing instruction
slug: processing-instruction
qid: 
snapshot: enwiki-001374334201
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1374334201
tags: [23603337, 26220375, 28537667]
---

# Processing instruction

> [!note] Provenance
> Snapshot `enwiki-001374334201` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1374334201> · Licensed CC BY-SA 4.0

A processing instruction (PI) is an SGML and XML node type, which may occur anywhere in a document, intended to carry instructions to the application. Processing instructions are exposed in the Document Object Model as Node.PROCESSING_INSTRUCTION_NODE , and they can be used in XPath and XQuery with the 'processing-instruction()' command.

A processing instruction (PI) is an SGML and XML node type, which may occur anywhere in a document, intended to carry instructions to the application. Processing instructions are exposed in the Document Object Model as Node.PROCESSING_INSTRUCTION_NODE , and they can be used in XPath and XQuery with the 'processing-instruction()' command. The XML Declaration at the beginning of an XML document (shown below) is another example of a processing instruction, however it may not technically be considered one. The DocBook XSLT stylesheets understand a number of processing instructions to override the default behaviour. A draft specification for Robots exclusion standard rules inside XML documents uses processing instructions.
