Simple XML array node target problem... Newbie
I am having a problem selecting only the first node value from this xml tree "xx" no matter how many dev items returned from array 2 or 200. I have been able to select the first item but I get hung up writing an array. New to actionsript learning is school, I spent time searching the board, if this is posted elsewhere please refer.
This is the target to find all first nodes only from an array that I am using. I know it is incorrect.
ArrValue[i] = BaseNode.FirstNode.childNodes[i]
Thanks for any guidance.
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<dev label="Sep 03" >
<xx>76084.71</xx>
<ww>52946.77</ww>
<ee>64058.4</ee>
</dev>
<dev label="Sep 04" >
<xx>117638.69</xx>
<ww>72082.64</ww>
<ee>94867.35</ee>
</dev>
</data
ACTIONSCRIPT-----------------------
function LoadSchoolData() {
var BaseNode = thisXML.childNodes[0];
//set up arrays
var ArrLabel = new Array();
var ArrValue = new Array();
var ThisNode;
//create datasource
var SchoolData = new DataProviderClass();
//get Data
for (var i=0; i >< BaseNode.childNodes.length; i++) {
ThisNode = BaseNode.childNodes[i];
ArrLabel[i] = ThisNode.attributes["label"];
/* I am having a problem with the ArrValue[i] selecting all the "<xx>76084.71</xx>" node from the tree from an array no matter if it is 1 or 100.*/
ArrValue[i] = BaseNode.FirstNode.childNodes[i];
SchoolData.addItem({CW:ArrLabel[i], TB:ArrValue[i]});
}
MyDev.setDataProvider(SchoolData);
MyDev.setLabelSource("CW");
MyDev.setValueSource("TB");
}