i am developing Rss Feed Reader App in j2me(java) for 2 xml files,but my for loop is
having a problem,xml file is giving null,when i run my application ,control is not going to this method in my loop getXMLFeed(url1); ,instead of that it is completing for loop.can any one help?is my looping is correct?once check my source Code?i am having problem with for loop
check my source code:
urls = new String[2];//Array Declaration
urls[0] = "http://www.teluguone.com/news/tonefeeds/topnews/topnews-20.rss";
urls[1] = "http://www.teluguone.com/news/tonefeeds/topstory/topstory-25.rss";
for (int i = 0; i < urls.length; i++) //iterration
{
myThread = new ParseThread(this);
myThread.getXMLFeed(url1);
myDysplay.setCurrent(mform);
}
public void getXMLFeed(final String url) {
Thread t = new Thread() {
public void run() {
myConnection = (HttpConnection) Connector.open(url);//HttpConnection
InputStream stream = myConnection.openInputStream();
ParseXMLFeed(stream);
}
Maybe you just forgot to paste the line, but it seems that you are no calling
t.start()insidegetXMLFeedmethod.