HTML and CSS Reference
To Save and Test an XML Document in a Browser
How Internet Explorer
In Internet Explorer 9,
the prolog statement
?> will display as
standalone=”true” ?>. The
root element <products
display as <products xsi:n
and not as typed.
The following steps save and test the XML document.
Save the completed chapter12-1products.xml document.
Start your browser. If necessary, click the Maximize button.
Type G:\Chapter12\ChapterFiles\chapter12-1products.xml in the Address bar
and then press the e n t e r key to display the completed document (Figure 12-17).
The document did not display as expected. What happened?
The tag on line 21 is not correct and prevents the XML data from displaying properly.
This error was made on purpose, so we know the line number. How do I find the line number of
an accidental error?
In Internet Explorer 9, press the F12 key. At the bottom of the browser a new window
displays. Click the Browser Mode: IE9 button on the toolbar and then click Internet Explorer
9: Compatibility View. This will not display the line number of the error, but will give you a
hint at what element may be wrong. The Firefox, Chrome, and Safari browsers will display
the error with a line number.
Will the browser show all the errors at one time?
Unfortunately, you will have to correct each error as it is found by the browser; the browser
parser stops processing when it encounters the first error.
data does not
because of error