Advertise Here
Need an introduction to XML? Learn what XML is all about and discover how XML differs from HTML. Explore XML syntax rules, learn how to write well-formed XML documents, adjust XML attributes, validate XML documents, and more. - ?
Extensible Markup Language

Search XML Files

XML Files RSS Feed XML Files Updates

 


Displaying XML

by Jan Egil Refsnes

back next

Displaying XML with JavaScript

To display XML data inside an HTML page you can use JavaScript to import data from an XML file. To see how XML and HTML complement each other this way; first look at the XML document (note.xml), then open the HTML document (note.htm) that contains a JavaScript which reads an XML file and displays the information inside the HTML page.

To see how it works, Try It Yourself  new


Displaying XML with CSS

To demonstrate how XML files can be formatted with CSS we have compiled the following XML files: 

Take a look at this pure XML file: The CD Catalog
Then look at this style sheet: The CSS file
Finally, view: The CD Catalog formatted with the CSS file

Even if it looks right to use CSS this way, we strongly believe that formatting with XSL will be the standard way to format XML in future (or as soon as the main browsers support it).


Writing your Homepage in XML?

Will we write our homepages in XML in the future?

No, we don't think so. But we could not resist giving it a try : A homepage written in XML

This might be the answer: Take a XHTML tutorial


Displaying XML with XSL

Follow this link to see how the content of an XML file can be displayed in the browser.

Follow this link to see how the same XML file is displayed by using an XSL style sheet.

Follow this link to see how the same data can be prepared by the server and returned to the browser as an HTML file.


To learn more about XSL

To learn more about XSL go to the XSL chapter.


back next
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 DevX XML Content 
- W3C Has a New XML Standard: XProc
- The Key XForms Enhancements in Version 1.1
- Performing Hierarchical Restructuring Using ANSI SQL
- Taking XML Validation to the Next Level: Explore CAM's Expressive Power
- Taking XML Validation to the Next Level: Introducing CAM

Jump to : Top Of Page or HOME