Chris Hill wrote:
The as3 examples for XML show the following:
var node:String = "zip";
trace(employees.employee[0].address[node]); // 98765
What I'd like to do is something like this:
var node:String = "zip";
trace(employees..[node]); // 98765
ie: Find all nodes that are called 'zip' in the document, but do it
dynamically.
any ideas?
C
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
Hey Chris,
You could do something like this:
for each(var n:String in employees..zip) {
trace(n);
}
That will loop through your XML and find all nodes with the name "zip".
For more information go
here:http://livedocs.adobe.com/cfusion/search/index.cfm?loc=en_US&termPrefix=site%3Alivedocs.adobe.com%2Fflash%2F9.0++&term=site%3Alivedocs.adobe.com%2Fflash%2F9.0++%22E4X%22&area=&search_text=E4X&action=Search
Cheers,
Nick
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com