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...
Professional Software Development Tools
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...
Try:
Code:--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
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 ???