|
Raw XML files can be viewed in Internet Explorer 5.0, but to
make it display like a web page, you have to add some display
information.
You must have Internet Explorer 5.0 or later to view the example
XML files.
Viewing XML with Internet Explorer 5.0
You can use IE 5.0 to view any XML document.
To view an XML document, you can click on a link, type the URL
in the address bar, or double-click on the name of an XML file
in a files folder.
If you open an XML document in IE, it will display the document
with color coded root and child elements. A plus (+) or minus
sign (-) to the left of the elements can be clicked to expand or
collapse the element structure.
If you want to view the raw XML source, you must select "View
Source" from the browser menu.
Note: Do not expect the XML file to be formatted like an HTML
document !
Viewing an invalid XML
file
If an erroneous XML file is opened with IE, IE will report the
error.
Why does XML display like
this?
XML documents do not carry information about how to display the
data.
Since XML tags are "made up" or "invented" by the author of the
XML document, we cannot know if a tag like <table> describes a
HTML type of table, or if it describes a wooden kitchen table.
Without any information about how to display the data, most
browsers will just display the XML document as it is.
In the next chapters, we will take a look at different solutions
to the display problem, using CSS, XSL, JavaScript, and XML Data
Islands.
|