Latest web development tutorials

See XML file

In all major browsers, we are able to view the original XML file.

Do not expect XML files are directly displayed as an HTML page.


See XML file

<? Xml version = "1.0" encoding = "ISO-8859-1"?>
- <Note>
<To> Tove </ to>
<From> Jani </ from>
<Heading> Reminder </ heading>
<Body> Do not forget me this weekend! </ Body>
</ Note>

Check the XML file: note.xml

XML document will be displayed with color-coded root and child elements. By clicking on the left side of the element plus sign (+) or minus (-), you can expand or collapse the structure elements. To view the raw XML source (without the + and - signs), select "View Page Source" from the browser's menu "View Source."

NOTE: In Safari, only the text elements will be displayed.To view the raw XML, you must right-click the page, select "View Source."


View invalid XML file

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

Please see this XML file: note_error.xml


Other examples of XML

Check out these XML documents, which will help you to build XML perceptions.

XML is a CD catalog
This is a CD collection, stored as XML data.

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 XML display like this?

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

Because XML tags can not be determined by the author of the XML document "invention", browsers like <table> tag exactly such a description of a HTML table or a dining table.

In the absence of any information about how to display the data, most browsers will just display the XML document as the source code.

In the following sections, we'll find out on this show a few solutions to the problem, which will use the CSS, XSLT and JavaScript.