# Need help with xml thingy

**URL:** <https://forum.kirupa.com/t/need-help-with-xml-thingy/272146>\
**Category:** Uncategorized\
**Created:** [October 2, 2008, 1:26pm UTC](https://forum.kirupa.com/t/need-help-with-xml-thingy/272146 "2008-10-02T13:26:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [October 2, 2008, 1:26pm UTC](https://forum.kirupa.com/t/need-help-with-xml-thingy/272146/1 "2008-10-02T13:26:47Z")

</div>

Aii there…Im just hook up to AS3 and facing this simple problems for most of u guys…but I really need help/shed some light on how to achieve it…Here’s the situation I Just attempt to make a simple crossword by loading data from xml file…so here’s are my xml format data

```auto

/*

<?xml version="1.0" encoding="iso-8859-1"?>
<puzzle>
    <board>
        <grid cell=". . . . f . . w . ." />
        <grid cell=". . . . e . . o . ." />
        <grid cell=". . h o r r o w . ." />
        <grid cell=". . e . r . . . . ." />
        <grid cell=". . l i a r . . . ." />
        <grid cell=". . l . r . . . . ." />
        <grid cell=". . o . i l l . . ." />
        <grid cell=". . . . . . u . . ." />
        <grid cell=". . . . . . s . . ." />
        <grid cell=". . . . . . t . . ." />
    </board>
    <words>
        <word direction="down" string="ferrari" clue="just sport car" />
        <word direction="down" string="wow" clue="intriguing expression" />
        <word direction="cross" string="horrow" clue="creepy" />
        <word direction="down" string="hello" clue="welcomings" />
        <word direction="cross" string="liar" clue="bluffing persons" />
        <word direction="cross" string="ill" clue="unwell conditions" />
        <word direction="down" string="lust" clue="flirtious feeling" />
    </words>
</puzzle>

*/

```

and here’s are my current attempt code…

```auto

stop();

import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;

var xmldata:XML;
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("cw.xml");
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete);

function onComplete(e:Event):void{
    if (loader != null){
        xmldata = new XML(e.target.data);
        var board:XMLList = xmldata.board;
        var words:XMLList = xmldata.words;
        
        trace(board.grid);

    }else{
        trace("loader is not a URLLoader!");
    }
}

```

So my problem is how to loop this value which is total 10  
/\*  
\<grid cell=". . . . f . . w . ." /\>  
\<grid cell=". . . . e . . o . ." /\>  
\<grid cell=". . h o r r o w . ." /\>  
\<grid cell=". . e . r . . . . ." /\>  
\<grid cell=". . l i a r . . . ." /\>  
\<grid cell=". . l . r . . . . ." /\>  
\<grid cell=". . o . i l l . . ." /\>  
\<grid cell=". . . . . . u . . ." /\>  
\<grid cell=". . . . . . s . . ." /\>  
\<grid cell=". . . . . . t . . ." /\>  
_/  
because i want to attach my movieclip from library by counting the total of node 10_10 grid…

Or maybe someone can lead me to the rite path…any help are really appreciated…tq
