W3Schools <!–
google_ad_client = “pub-3440800076797949”;
/*txtimg*/
google_ad_slot = “5330033957”;
google_ad_width = 728;
google_ad_height = 90;
//–>

<a href=”/default.asp” target=”_blank”><img src=”/banners/w6.gif” border=”0″ alt=”W3Schools” /></a>

home HOME

XML Basic
XML HOME
XML Introduction
XML How to use
XML Tree
XML Syntax
XML Elements
XML Attributes
XML Validation
XML Validator
XML Viewing
XML CSS
XML XSLT

XML JavaScript
XML Parser
XML DOM
XML to HTML
XML HTTP Request
XML Application

XML Advanced
XML Namespaces
XML CDATA
XML Encoding
XML Server
XML DOM Advanced
XML Don’t
XML Technologies
XML in Real Life
XML Editors
XML Summary

Examples/Quiz
XML Examples
XML Quiz

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

<!–
google_ad_client = “pub-3440800076797949”;
/*LeftLinkUnit*/
google_ad_slot = “4854527104”;
google_ad_width = 120;
google_ad_height = 90;
//–>

Displaying XML with XSLT

previous next


With XSLT you can transform an XML document into HTML.


Displaying XML with XSLT

XSLT is the recommended style sheet language of XML.

XSLT (eXtensible Stylesheet Language Transformations) is far more sophisticated than CSS.

One way to use XSLT is to transform XML into HTML before it is displayed by the browser as demonstrated in these examples:

View the XML file, the XSLT style sheet, and View the result.

Below is a fraction of the XML file. The second line links the XML file to the XSLT file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="simple.xsl"?>
<breakfast_menu>
  <food>
    <name>Belgian Waffles</name>
    <price>$5.95</price>
    <description>
       two of our famous Belgian Waffles
    </description>
    <calories>650</calories>
  </food>
</breakfast_menu>

If you want to learn more about XSLT, find our XSLT tutorial on our homepage.


Transforming XML with XSLT on the Server

In the example above, the XSLT transformation is done by the browser, when the browser reads the XML file.

Different browsers may produce different result when transforming XML with XSLT. To reduce this problem the XSLT transformation can be done on the server.

View the result.

Note that the result of the output is exactly the same, either the transformation is done by the web server or by the web browser.


previous next


Your browser does not support inline frames or is currently configured not to display inline frames.

Altova® XMLSpy® – The world’s best-selling XML editor!

Whether you’re new to XML or already an advanced user, the user-friendly views and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to meet your XML and Web services development needs from start to finish.

  • XML editor
  • Graphical XML Schema / DTD editors
  • XSLT 1.0/2.0 editor, debugger, profiler
  • XQuery editor, debugger, profiler
  • Support for Office Open XML (OOXML)
  • Graphical WSDL editor & SOAP debugger
  • Java, C#, C++ code generation
  • And much more!

Download a free 30-day trial today!

Click to see a demo!

Learn what’s new in v2008


<!–
google_ad_client = “pub-3440800076797949”;
/*txt*/
google_ad_slot = “1699448869”;
google_ad_width = 336;
google_ad_height = 280;
//–>


Your browser does not support inline frames or is currently configured not to display inline frames.

diploma

Get Your Diploma!

W3Schools’ Online Certification Program is the perfect solution for busy professionals who need to balance work, family, and career building.

The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.

The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.


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

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

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999
SITE SEARCH
About W3Schools
W3Schools Forum
Web charting
Web based charting
for ASP.NET
WEB HOSTING
$15 Domain Name
Registration
Save $20 / year!
UK Domain Names
UK Web Hosting

Alojamiento Web
Buy UK Domain Names
Register Domain Names
Cheap Domain Names
Cheap Web Hosting
Best Web Hosting
Domain Name Registration
PHP MySQL Hosting
Top 10 Web Hosting
Web Hosting Company
UK Reseller Hosting
Web Hosting
WEB BUILDING
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Custom Programming
FREE Trial or Demo
Web Content Manager
Forms,Web Alerts,RSS
Ecommerce Software
XMLSpy XML Editor
Azbuz Blog
SHOPPING
UK Wholesalers
UK Wholesale
UAE Dubai Property
Private Student Loans
UK Dropshippers & Wholesalers Directory
EDUCATION
US Web Design Schools
HTML Exam
YELLOW PAGES
www.nettkatalogen.no
www.gulex.dk
www.gulex.se
www.gelbex.de
www.teloos.fi
www.teloos.fr
www.teloos.co.uk
www.teloos.at
www.teloos.de

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s