August 2000
Beginner
456 pages
9h 24m
English
Your next program will perform the same type of data extraction as was done in Listing 2.2. However, this time you'll adapt your traversal to the number of nodes by first determining what the number is and then using a loop to step through the array. Furthermore, the names of the nodes will be extracted and used as the labels. The XML data file that you'll use as your source will be Listing 2.3.
The following code will read the data from an XML file. The first step is to determine the number of nodes in the list of data nodes. Once that's done, a loop is used to step through the array and extract both the name and the contents of the node. These two values are then inserted into tags and placed ...
Read now
Unlock full access