Hi,
I have an XML file which has got some animal names and I want to fetch all the animal names in a text box.
Please let me know how should I do that.
Here is the code that I am using in Flash. Using this code I am getting the name of last animal only.
I have also attached a text file for XML tags that I am using.Code://First load the XML file through the XML Object var OpenXML:XML = new XML(); //I created an instance of the XML Object called "OpenXML" OpenXML.ignoreWhite = true; //ignore the white spaces of the document. OpenXML.onLoad = function() //When load all data, do the following actions. { var openHowMany:Array = new Array(); //An array to store the nodes of the XML document openHowMany = this.firstChild.childNodes; //This is useful to know how many results do we have. if(openHowMany.length > 0) //If we have more than 0 results. { for(var i:Number =0; i < openHowMany.length; i++){ animalName=this.firstChild.childNodes[i].attributes.Name; //animalName is the name of my textbox } } } var date:Date=new Date(); version=date.valueOf(); OpenXML.load("open_project.xml");