Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML example

XML example


These examples demonstrate XML files, XML formatting, and XML transformation (XSLT).

They also demonstrate JavaScript used together with XML (AJAX).


View the XML file

View a simple XML file (note.xml)
View the same XML file with an error
View an XML CD catalog
View an XML plant catalog
View an XML food menu

Example Explanation


XML and CSS

View an XML CD catalog
View the corresponding CSS file
Display the CD catalog formatted by a CSS file

Example Explanation


XML and XSLT

View an XML food menu
View the corresponding XSLT stylesheet
Display the food menu formatted by an XSLT stylesheet

Example Explanation


Parsing XML and XML DOM

View a simple XML file (note.xml)
Parse an XML file - cross-browser example
Parse an XML string - cross-browser example

Example Explanation


XML to HTML

View an XML CD catalog
Display XML data as an HTML table

Example Explanation


XML Applications

View an XML CD catalog
Display XML data in a div element
XML node navigation
A simple CD catalog application

Example Explanation


XML output from the server

See how ASP returns XML
See how PHP returns XML
View XML output from a database

Example Explanation


Advanced XML DOM

Get the value of an XML element
Get the value of an XML attribute
Change the value of an XML element
Add a new attribute to an XML element
Create a new XML element
Delete an XML element

Example Explanation