AJAX can be used to communicate interactively with XML files.
AJAX XML example
The following example demonstrates how a web page can use AJAX to read information from an XML file:
Example
Example analysis - loadXMLDoc() function
When the user clicks the "Get My Collection CD" button above, the loadXMLDoc() function will be executed.
The loadXMLDoc() function creates an XMLHttpRequest object, adds functions that execute when the server response is ready, and sends the request to the server.
When the server response is ready, an HTML table is built, the nodes (elements) are extracted from the XML file, and finally the table element with id="demo" is populated with the XML data: