The XML Document Used
In this application we will use the "cd_catalog.xml" file.
Display the First CD in an HTML div Element
The following example gets the XML data from the first CD element and displays it in an HTML element with id="showCD". The displayCD() function is called when the page is loaded:
Navigate Between the CDs
To navigate between the CDs in the example above, add a next() and previous() function:
Show Album Information When Clicking On a CD
The last example shows how you can show album information when the user clicks on a CD: