# Xml + flash

**URL:** <https://forum.kirupa.com/t/xml-flash/215713>\
**Category:** Uncategorized\
**Created:** [February 9, 2007, 5:25pm UTC](https://forum.kirupa.com/t/xml-flash/215713 "2007-02-09T17:25:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergeylandar](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sergeylandar](https://forum.kirupa.com/u/sergeylandar)\
**Post date:** [February 9, 2007, 5:25pm UTC](https://forum.kirupa.com/t/xml-flash/215713/1 "2007-02-09T17:25:47Z")

</div>

hi!  
i dont know flash and xml:) but i need understand about ‘how extract words from xml to flash’.  
look  
i have flash file, where i write this code:  
var offers = [["", 0], ["", 0]];  
function loadXML(fileName) {  
var fileName:String;  
album = new XML();  
album.onLoad = handleLoad;  
album.ignoreWhite = true;  
album.load(fileName);  
}  
function handleLoad(success) {  
if (success) {  
for (var count01 = 0; count01\<album.childNodes.length; count01++) {  
main = this.childNodes[count01];  
for (var count02 = 0; count02\<main.childNodes.length; count02++) {  
var myid = Number(main.childNodes[count02].attributes.id);  
offers[myid-1][0] = main.childNodes[count02].attributes.destination;  
offers[myid-1][1] = main.childNodes[count02].attributes.price;  
}  
}  
offer1 = offers[0][0];  
price1 = "£ "+offers[0][1];  
offer2 = offers[1][0];  
price2 = "£ "+offers[1][1];  
play();  
} else {  
output = “Attempt load XML failed”;  
//displayError();  
}  
}  
loadXML(“destinations.xml”);  
stop();

also i have first xml file:  
\<?xml version=“1.0” encoding=“utf-8”?\>  
\<offers\>  
\<direction name=“food”\>  
\<offer id=“1” destination=“Mirgorod” price=“11”/\>  
\<offer id=“2” destination=“Kiev” price=“12”/\>  
\</direction\>  
\</offers\>

and second xml file:  
\<?xml version=“1.0” encoding=“utf-8”?\>  
\<offers\>

```
	&lt;offer id="1" destination="Mirgorod" price="11"/&gt;
	&lt;offer id="2" destination="Kiev" price="12"/&gt;

```

\</offers\>

so, second xml file working with flash file, but first no:(  
who can help me?  
thank you so much!!!  
pls look my attachmend

so, i want repeat task again  
flash must working with first xml file
