View Full Version : is it posible to count of xml pages in a folder and random view them ?
GoOgLe
12-26-2008, 05:24 AM
is it posible to count of xml pages in a folder and random view them ?
i have a folder and there r a few xml files in it... i want to get count of them and load them to project randomly...
Imagine Programming
12-26-2008, 04:30 PM
Try:
--Getting all the XML Files and put them in a table. You could put this on preload.
tblXmlFiles = File.Find("C:\\test\\", "*.xml", true, false, nil, nil);
--put this on a button or something else
if(tblXmlFiles)then
local num=Math.Random(1, Table.Count(tblXmlFiles));
if(File.DoesExist(tblXmlFiles[num]))then
XML.Load(tblXmlFiles[num]);
--Further actions for processing the XML File here.
end
end
GoOgLe
12-27-2008, 04:36 AM
thanks alot m8 it works perfect... but if my xml files r online then it doesnt work... what should i do for it ???
example : "http://www.google.com/xml/" lets say all my xml files r in that folder... how can i make it with that ???
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.