|
Is what you are doing truly an array? It actually seems like a collection of variables with names that are sequentially incremented. A true array would use one variable to point at the array then reference each value in an iterative loop. example: var foo = new Array(); foo[0] = "bar"; foo[1] = "bah"; foo[2] = "blah"; ... The e4x operators can be used to assign variables to an in memory representation of XML that can later be referenced. You can assign them using the "=" operator. The syntax for iterating through the loop is: function output(arr){ len = arr.length; for(var i=0; i<len; i++){ // here is where you can assign each value to an xml node; } } I have not tried this but I believe the syntax would be similar to this within the previous snippet: XMLDocument myDoc = new XMLDocument; //set your root element //set your child element my.child[i]=foo[i]; // this should assign the value of foo[i] to your element[i] for the number of items in your array. I have not tested this but I think you could figure it out from the examples at Good luck. If you cannot get this working, let me know and I can try it. Of course, there are hundreds of others who are much more qualified that I at this. Duane "Speaking only for myself" Site - http://www.nickull.net My Music - http://www.mix2r.com/ On 28-Sep-06, at 7:47 AM, richmcgillicuddy wrote:
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- RE: [flexcoders] Conversion from Array to XML Tracy Spratt
- [flexcoders] Re: Conversion from Array to XML wayne_badu_johnson
- Re: [flexcoders] Conversion from Array to XML DUANE NICKULL

