HOME

XML Basic
XML HOME
XML Introduction
XML How to use
XML Syntax
XML Elements
XML Attributes
XML Validation
XML Browsers
XML Viewing
XML CSS Display
XML XSL Display
XML Data Islands
XML Parser
XML in Real Life

XML Advanced
XML Namespaces
XML CDATA
XML Encoding
XML Server
XML Applications
XML HTTP
XML Behaviors
XML Technologies

Examples/Quiz
XML Examples
XML Quiz


XML WebRing
Previous 5 Sites
Previous Site
Next Site
Next 5 Sites
Random Site
List Sites
Download XMLSpy here
Please visit our sponsors !

Viewing XML Files

prev next

Raw XML files can be viewed in IE 5.0 (and higher) and in Netscape 6, but to make it display like a web page, you have to add some display information.


Viewing XML Files

To view an XML document in IE 5.0 (and higher) 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.

To view an XML document in Netscape 6 you'll have to open the XML file and then right-click in XML file and select "View Page Source". If you open an XML document in Netscape 6, it will display the document with color coded root and child elements.

Look at this XML file: note.xml

Note: Do not expect XML files to be formatted like an HTML document !


Viewing an invalid XML file

If an erroneous XML file is opened, the browser will report the error.

Look at this XML file: note_error.xml


Other Examples

Viewing some XML documents will help you get the XML feeling.

We have collected the following XML data files for you:

An XML CD catalog
This is my fathers CD collection, stored as XML data (old and boring titles I think).

An XML plant catalog
This is a plant catalog from a plant shop, stored as XML data.

A Simple Food Menu
This is a breakfast food menu from a restaurant, stored as XML data.


Why does XML display like this?

XML documents do not carry information about how to display the data.

Since XML tags are "invented" by the author of the XML document, browsers do not know if a tag like <table> describes an HTML table or a dining 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.


prev next

Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


Search W3Schools:


What Others Say About Us

Does the world know about us? Check out these places:

Dogpile Alta Vista MSN Google Excite Lycos Yahoo Ask Jeeves


We Help You For Free. You Can Help Us!


W3Schools is for training only. We do not warrant its correctness or its fitness for use. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2002 by Refsnes Data. All Rights Reserved


Validate How we converted to XHTML Validate

Domain Name Registration
Domain Name
Registration & More!



Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search