What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
Right now I have an XML tile map in this format
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();
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 “,”?
> *Originally posted by **[Kewry](/forums/4/topics/324469?page=1#posts-6822892):***
> have you taken a look at JSON? it could ease up the trouble seeing as data comes in arrays
Well yes, I read a lot about JSON it’s a lot better than XML, but I’m not good enough yet to implement JSON, so this time I’m going with XML.
You should look at how other people read XML files from Ogmo editor and similar data. All of it has a structure of some kind. Draco has already given you the appropriate code for your situation, though. The split() function is very useful.