Right now I have an XML tile map in this format
<tile>b1</tile> <tile>b1</tile> <tile>t2</tile> <tile>t2</tile> <tile>t2</tile> <tile>t2</tile>
Well it’s only a part of it, it actually is more than 1000 rows. And I parse it like this:
var mapTiles:XMLList = new XMLList();
var xml:XML;
xml = new XML(xmlLoader.data);
mapTiles = xml.tile.children();
for(var a:int = 0; a < mapTiles.length(); a++)
{
testingArray[a] = mapTiles.text()[a]; //Looping through array and adding values
}
But well, I believe it is not a very effective method, the question is:
if I had an XML file like this:
<tile>b1, b1, t2, t2, t2, t2, t2, t2</tile>
How would i parse it? How could I insert into array each element separated by “,”?