XML Processing Instruction

XML > Structure > XML Processing Instruction

Processing Instructions allow application specific data to be embedded within an XML document. This allows information to be embedded outside of the document so a consuming application can read it without it being confused with the actual data.

A common example of a Processing Instruction is the xml-stylesheet directive. XSLT processors knows how to interpret this processing instruction and use it determine the XSL style sheet to be used to transform the XML document.

<?xml-stylesheet type="text/xsl" href="/Content/Glossary/main.xsl"?> 

It is possible to create custom Processing Instruction that your own application understands.

When an application reads a Processing Instruction it does not understand it should be ignored.

EBNF Syntax

The syntax for a Processing Instruction is described by the W3C using EBNF as follows.

[16]  PI                ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

See Also

Try Liquid XML Free and see how we can help you today Free Trial