26.01.2019 Views

XML Simplified

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Module 1<br />

Introduction to <strong>XML</strong><br />

1.4.2 Processing Instructions<br />

Processing instructions are information which is application specific. These instructions do not follow<br />

<strong>XML</strong> rules or internal syntax. With the help of a parser these instructions are passed to the application.<br />

The application can either use the processing instructions or pass them on to another application.<br />

Concepts<br />

The main objective of a processing instruction is to present some special instructions to the application.<br />

All processing instructions must begin with .<br />

Though an <strong>XML</strong> declaration also begins with , it is not considered as a processing<br />

instruction. It is because an <strong>XML</strong> declaration provides information only for the parsers and not for the<br />

application. In some cases, the application might need the information in the processing instruction only<br />

if it displays the output to the user.<br />

Syntax:<br />

<br />

where,<br />

PITarget is the name of the application that should receive the processing instructions.<br />

is the instruction for the application.<br />

The following code demonstrates an example of processing instruction.<br />

Code Snippet:<br />

<br />

John<br />

<br />

Brown<br />

<br />

Final<br />

<br />

where,<br />

feesprocessor is the name of the application that receives the processing instruction.<br />

SELECT fees FROM STUDENTFEES is the instruction.<br />

<strong>XML</strong> <strong>Simplified</strong><br />

Version 1.0 © Aptech Limited

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!