Hi
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?
check my source code:
urls = new String[2];
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++)
{
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);
InputStream stream = myConnection.openInputStream();
ParseXMLFeed(stream);}

Reply With Quote


