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

Hour 23. Using XML to Describe Data > HTML and JavaScript Code to Read an XML F...

HTML and JavaScript Code to Read an XML File

The next step is to present code that will read the data from any XML file that has only one level of data. By that, I mean that the data part of the XML file is a nodelist where none of the nodes is itself a nodelist.

In IE, the reading of the data is done by applying an xmldom object, another type of ActiveX object like those covered in Hour 17, “Interactive Pages with Applets and ActiveX.” The xmldom object will accept an XML file and separate it into the pieces that are the separate nodes. The nodes in the data nodelist are made into an array. JavaScript code can then be used to move from node to node and read the data. JavaScript was covered in Hour 18, “Web Page Scripting for Non-Programmers.”


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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