Xml data referencing and flixel

36 Views Asked by At

I have started using XMLs for the first time in flixel, and I have run into some trouble.

I am trying to get the tileset out of this:

<Ground tileset="Tiles" exportMode="CSV">

//some code

</Ground>

I have tried: Ground.tileset and Ground.@tileset, this may be a very simple solution... but I haven't used XMLs very much.

Thanks,

1

There are 1 best solutions below

0
akmozo On BEST ANSWER

I think that you have just to use an XML object like this :

var xml:XML = 
    <Ground tileset="Tiles" exportMode="CSV">
        <!-- some code -->
    </Ground>
;

trace(xml.@tileset);    // gives : Tiles

Hope that can help.