I'm at ends with accessing my XML attribute data. Here is my xml:
<bundles>
<AZ>
<Product_1 type="bundle" cost="50.00" />
<Product_2 type="bundle" cost="75.00" />
<Product_3 type="product" cost="22.00" />
<Product_4 type="product" cost="186.00" />
<Product_5 type="product" cost="125.00" />
</AZ>
</bundles>
And my AS:
code:
var myxml = new XML();
myxml.ignoreWhite = true;
myxml.onLoad = function()
{
trace(this.firstChild.childNodes[0].firstChild.childNodes[0].firstChild.childNodes[0].attributes.cost);
}
myxml.load("bundleData.xml");
I can't get anything to trace but undefined. I've tried most variants of the trace line as well.
Any help would be greatly appreciated,
1M.