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 3<br />

DTDs<br />

Concepts<br />

3.3.3 Testing <strong>XML</strong> for Validity<br />

Validity being a desirable trait, it is necessary to be able to validate <strong>XML</strong> documents after their creation.<br />

Validity of <strong>XML</strong> documents can be determined by using a validating parser such as MS<strong>XML</strong> 6.0 Parser.<br />

MS<strong>XML</strong> enables the Internet Explorer (IE) browser to validate the code. Once the code is displayed in IE,<br />

right-click the code to display the context menu. The menu provides the option of validating the code. On<br />

selection, IE internally validates the code against the code's DTD.<br />

The first image of figure 3.5 displays the validation result of a valid mobile.xml file.<br />

The second image of figure 3.5 displays the validation result after the removal of the signature element<br />

from the document's DTD.<br />

Figure 3.5: Testing the validity of an <strong>XML</strong> file<br />

Version 1.0 © Aptech Limited<br />

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

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

Saved successfully!

Ooh no, something went wrong!