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

Chapter 17. Working with XML and JavaScr... > Reading and Showing XML Data with Ja...

Reading and Showing XML Data with JavaScript

As noted previously, Version 6 JavaScript browsers seem to be coming together over the W3C DOM. Several key methods and properties in JavaScript can help in getting information from an XML file. In the section, a very simple XML file is used to demonstrate pulling data from XML into an HTML page using JavaScript to parse (interpret) the XML file. Unfortunately, the examples are limited to using IE5+ on Windows. (The same programs that worked fine using IE5+ on Windows bombed using IE5+ on the Mac using either OS 9+ or OS X.)

However, the great majority of keywords used in the scripts are W3C DOM– compliant, and the only keywords required from the Microsoft-unique set are XMLdocument and document.all(). All of the other keywords are found in NN6+. Table 17.1 shows the W3C JavaScript keywords used in relationship to the XML file examples.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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