Skip to content
uencoder

XML Processing Instruction

An XML processing instruction passes application-directed instructions as <?target data?>, e.g., <?xml-stylesheet?> to associate a stylesheet.

Purpose

To embed instructions for specific applications inside an XML document, directing processing without affecting the document data.

Mechanism

The form <?target data?>: target identifies the application the instruction is for, and data is the instruction content (not XML-structured). The parser hands the PI to the application. The <?xml ...?> declaration is a special PI.

Use cases

  • Associating XML stylesheets
  • The XML declaration
  • Application-specific directives

Related tools

References