Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
A Simple XML-Based Searchable Database
Author: Joachim Schnier
| Website: http://www.cancerinform.net/ |
The Fla file: Actionscript for buttons, accessing the XML file
We now have to get access to the XML file. We do that by creating a function containing a loop. In this function we search for the root node "models".
//function to get to the root node and the childnodes
function newModel() {
//loop going through the xml file whereby childNodes.length is the number of child nodes
for (var count01=0; count01<=models.childNodes.length; count01++) {
//the root node name "models"
if (this.childNodes[count01].nodeName.toLowerCase() == "models") {
//this var holds the complete xml file
modelsDescryption = this.childNodes[count01];
}
}
//function to get access to individual childnodes
//modelsDescryption will carry over the extracted contents from the previous
//function to the next function
findModels(modelsDescryption);
}
| » Level Intermediate |
|
|
Added: : 2002-07-05
Rating: 8.30 Votes: 140
Hits: 3850
|
| » Author |
|
The author is a scientist working in cancer research.
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (209 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|