View XML Files
In all major browsers, the original XML file can be viewed.
Do not expect the XML file to be displayed directly as an HTML page. View XML Files
<?xml version= "1.0" encoding= "iso-8859-1"?>-< Note > < to > Tove </to > < from > Jani &L t;/from > < heading > Reminder |
View this XML file: Note.xml
The XML document is displayed as the root of the code color and as a child element. You can expand or close 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 file from the browser menu.
Note: in Safari, only the text of the element will be displayed. To view the original XML, you must right-click the page and select View Source file. to view an invalid XML file
If an incorrect XML file is opened, the browser will report an error.
Please view this XML file: Note_error.xml other XML instances
Check out these XML documents, which will help you build a perceptual understanding of XML.
A CD directory of XML
This is a CD set, stored as XML data.
A botanical directory of XML
This is a plant directory from the plant store, stored as XML data.
A simple food Menu
This is a breakfast menu from a restaurant, stored as XML data. Why does XML appear this way?
The XML document does not carry information about how to display the data.
Because the XML tag was "invented" by the author of the XML document, the browser was unable to determine whether a label like <table> actually describes an HTML table or a table.
In the absence of any information about how to display the data, most browsers will simply display the XML document as the source code.
In the following sections, we'll look at a few solutions to this display problem, which will use CSS, XSLT, and JavaScript.