• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. XML and XSLT > Accessing XML Documents

Accessing XML Documents

You can access data in XML documents using JavaScript in several ways, and I’ll take a look at them here. The idea is that you load the XML document in behind the scenes, work with it by extracting the data you want, and then display your results using HTML.

To see how this works, I’ll use our XML document, 22-01.xml, throughout this chapter. The data I’ll extract is the first and last name of the third person attending the event, who we’ll consider the main guest—in our case, that’s Cary Grant:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint