This section provides a tutorial example on how to use IE (Internet Explorer) as an XML file syntax checker. If there are syntax errors in an XML file, IE will stop displaying the XML file at the first error location.
Internet Explorer can also be used as an XML syntax checker.
Do you know how many syntax errors are in this XML file?
If you open incorrect.xml with IE, you will see this:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
------------------------------------------------------------------------
End tag 'Name' does not match the start tag 'name'.
Error processing resource 'file:///C:/herong/xml/incorrect.xml'.
Line 8, Position 32
<name is_acronym="true">XML</Name>
-------------------------------^
This is almost perfect.
It tells you what is the error: "End tag 'Term does not
match the start tag 'term'." Remember element tags are case sensitive.
It also tells you where is the error: "Line 8, Position 32".
But it only tells the first error. To see the other errors you must
correct the first one, and re-open the file again in IE.
Exercise: Fix all the syntax errors in incorrect.xml.