Hey all - I'm trying to access a sub node in my xml without success, any pointers would be great!!
Code:
XML -
<book>
<title>a title</title>
<author>an author</author>
<price>a price</price>
<photos>
<photo>
<url>URL</url>
<width></width>
<height></height>
</photo>
<photos>
</book>
Ok this is just a sample xml I knocked up as my actual is quite large, but the idea is the same. I am using
Code:
var valueRange = xmlData.valueRange; // finds a specific node group called 'valueRange' from the large loaded xml in xmlData.
for (var i:uint = 0; i < valueRange.children().length(); i++) {
trace ("item is string? = " + valueRange.*[i] is String+"\n");
trace("item " + i + " = " + valueRange.*[i].text()+"\n");
}
which pulls out the title, author, price data, but the sub nodes are just item n =
It reports that the sub nodes are Strings. Any suggestions would be great!!
frank