About processing instructions

Microsoft Office InfoPath

Show All Show All

About processing instructions

Processing instructions (PIs) are used to provide information in an XML document that the XML parser passes on to the calling application. PIs are primarily used to tell an application how to handle the data contained within an XML document. PIs must begin with an identifier called a target, which follows rules similar to those for element and attribute names. Targets are case-sensitive and must start with a letter or underscore. The rest of the target can contain letters, numbers, hyphens, underscores, periods, and colons. Any valid XML textual characters can appear after the target. The following is an example of a processing instruction that is used to indicate that the XML document should be displayed using an XSL style sheet:

<?xml-stylesheet type="text/xsl" href="MyStylesheet.xsl"?>

PIs can be placed anywhere in an XML document outside of other markup. They can be placed in the prolog, following the root element, or within the value of an element. They are usually placed in an XML document's prolog.