<?xml version="1.0" encoding="ISO-8859-1"?>- <note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body> Don't forget me this weekend!</body ></note>
View this XML file: note.xml
The XML document will be displayed as code-colored root and child elements. You can expand or collapse the structure of an element by clicking the plus sign (+) or minus sign (-) to the left of the element. To view the original XML source (excluding the + and - symbols), select "View Page Source" or "View Source" from the browser menu.
Note: In Safari, only the element's text will be displayed. To view the raw XML, you must right-click on the page and select "View Source".
If a wrong XML file is opened, the browser will report an error.
Please view this XML file: note_error.xml
Check out these XML documents to help you develop a feel for XML.
An XML CD catalog This is a CD set stored as XML data.
An XML plant catalog This is a plant catalog from a plant store, stored as XML data.
A simple food menu This is a breakfast menu from a restaurant, stored as XML data.
XML documents carry no information about how to display the data.
Since XML tags were "invented" by the author of the XML document, the browser cannot determine whether a tag like <table> describes an HTML table or a dining table.
Without any information about how to display the data, most browsers will simply display the XML document as source code.
In the following chapters, we'll look at several solutions to this display problem, using CSS, XSLT, and JavaScript.
Tip: Although all major browsers can support viewing XML files, different browsers process XML files in different ways.
XML elements