This section provides some XML usage examples. Use these examples to consolidate your knowledge of XML!
These examples demonstrate XML files, XML formatting, and XML transformation (XSLT).
JavaScript (AJAX) used with XML is also demonstrated.
View XML file
View a simple XML file (note.xml)
View an identical XML file with errors
View an XML CD directory
View an XML plant catalog
View an XML food menu
Example explanation
XML and CSS
View an XML CD directory
View the corresponding CSS file
Display CD directory formatted by CSS file
Example explanation
XML and XSLT
View an XML food menu
View the corresponding XSLT stylesheet
Display a food menu formatted by an XSLT stylesheet
Example explanation
Parse XML and XML DOM
View a simple XML file (note.xml)
Parse XML files - cross-browser example
Parsing XML strings - cross-browser example
Example explanation
XML to HTML
View an XML CD directory
Display XML data as HTML table
Example explanation
XML application
View an XML CD directory
Display XML data in div element
XML node navigation
A simple CD directory application
Example explanation
XML output from server
See how ASP returns XML
See how PHP returns XML
View XML output from database
Example explanation
XML DOM Advanced
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