Sorry for the confusing question. I am writing a project management application where I have several XML files ( for users, projects, etc). I want to bundle these XML files into single file and want Load/Save that single file as a project.
Say, If I load Project1.proj (whatever the extension is) it should contain the XML files in it and load it with itself.
Please help me!
One Comment
Fill an array with your xml files or use bulk loader.
http://code.google.com/p/bulk-loader/. Kinda like this…
you may want to alter the way it pushes the files into the array so you have more control over when and where each one gets pushed into the array. That way you know exactly where in the array it is located instead of the order being dependent on how long it took to load. You can reorganize them in another loop… or you can fill the array with the rss loaders and then replace the loader after it was loaded. The first of which is more light weight, the second is a little easier to write and read.
Code:
var myXMLArray:Array = new Array();
for (var i = 0; i != numRssFeeds; i++) {
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest("http://theflashblog.com/?feed=rss"));
loader.addEventListener(Event.COMPLETE, onLoaded);
}
function onLoaded(e:Event):void
{
var xml:XML = new XML(e.target.data);
var il:XMLList = xml.channel.item;
for(var i:uint=0; i<il.length(); i++)
{
trace(il.title.text()[i]);
}
myXMLArray.push(xml);
}
function somePlaceYouUseTheArray():void
{
myXMLArray[index of xml file we want]…
}
Post a Comment