Hello Friends,

I am new to j2me platform. I am developing a new live application in j2me.
I am parsing the xml file in my application. When i tested my application in wtk tool it doesn't shows any error.
When i open the emulator the connection also made but i couldn't view my xml data in my mobile.
My application code as below:

Note: RSSParser - parser file name
My main MIDlet:
public class RSSMIDlet extends MIDlet implements CommandListener, RSSListener
{
private Display mDisplay;
private List mTitleList;
private Command mExitCommand,mDetailsCommand, mRuns, mBatting, mBowling;
private boolean mInitialized;
private Vector mbatteamname, mbwlteamname, mbatteamruns, mbatteamwkts, mbatteamovers;
public RSSMIDlet()
{
mInitialized = false;
mbatteamname = new Vector();
mbwlteamname = new Vector();
mbatteamruns = new Vector();
mbatteamwkts = new Vector();
mbatteamovers = new Vector();
}
public void startApp()
{
if (mDisplay == null)
mDisplay = Display.getDisplay(this);
if (mInitialized == false)
{
// Put up the waiting screen.
Screen waitScreen = new Form("Connecting...");
mDisplay.setCurrent(waitScreen);
// Create the title list.
mTitleList = new List("Cricket_Today", List.IMPLICIT);
mExitCommand = new Command("Exit", Command.EXIT, 0);
mDetailsCommand = new Command("more", Command.SCREEN, 0);
mRuns = new Command("score", Command.SCREEN, 0); mBatting = new Command("Battin_Team", Command.SCREEN, 0); mBowling = new Command("Bowling_Team", Command.SCREEN, 0);
mTitleList.addCommand(mExitCommand);
mTitleList.addCommand(mDetailsCommand);
mTitleList.addCommand(mRuns);
mTitleList.addCommand(mBatting);
mTitleList.addCommand(mBowling);
mTitleList.setCommandListener(this);
// Start parsing.
String url = "http://67.18.237.131/mobilemirchi/ZIM-IND-.xml";
RSSParser parser = new RSSParser();
parser.setRSSListener(this);
parser.parse(url);
mInitialized = true;
}
else
{
mDisplay.setCurrent(mTitleList);
}
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void commandAction(Command c, Displayable s)
{
if (c == mExitCommand)
notifyDestroyed();
else if(c == mDetailsCommand)
{
int selection = mTitleList.getSelectedIndex();
if (selection == -1) return;
String batteamname = (String)mbatteamname.elementAt(selection);
String bwlteamname = (String)mbwlteamname.elementAt(selection);
String batteamruns = (String)mbatteamruns.elementAt(selection);
String batteamwkts = (String)mbatteamwkts.elementAt(selection);
String batteamovers = (String)mbatteamovers.elementAt(selection);
Alert a = new Alert(batteamname, batteamname + "Vs" + bwlteamname,null, null);
a.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(a, mTitleList);
}
else if(c == mRuns)
{
int selection = mTitleList.getSelectedIndex();
if (selection == -1) return;
String batteamname = (String)mbatteamname.elementAt(selection);
String batteamruns = (String)mbatteamruns.elementAt(selection);
String batteamwkts = (String)mbatteamwkts.elementAt(selection);
String batteamovers = (String)mbatteamovers.elementAt(selection);
Alert a = new Alert("SCORE", batteamname + "=" + batteamruns + "/" + batteamwkts + " - " + "overs" + "-" + batteamovers,null, null);
a.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(a, mTitleList);
}
else if(c == mBatting)
{
int selection = mTitleList.getSelectedIndex();
if (selection == -1) return;
String batteamname = (String)mbatteamname.elementAt(selection);
Alert a = new Alert(" Batting Team ", batteamname , null, null);
a.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(a, mTitleList);
}
else if(c == mBowling)
{
int selection = mTitleList.getSelectedIndex();
if (selection == -1) return;
String bwlteamname = (String)mbwlteamname.elementAt(selection);
Alert a = new Alert(" Bowling Team ", bwlteamname,null, null);
a.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(a, mTitleList);
}
}
public void itemParsed(String currentinningsno, String batteamname, String bwlteamname, String batteamruns, String batteamwkts, String batteamovers)
{
mbatteamovers.addElement(batteamovers);
mTitleList.append(batteamovers, null);
}
public void exception(java.io.IOException ioe)
{
Alert a = new Alert("Exception", ioe.toString(), null, null);
a.setTimeout(Alert.FOREVER);
mDisplay.setCurrent(a, mTitleList);
}
My xml parsing java code:

public void parse(final String url)
{
Thread t = new Thread()
{
public void run() {
// set up the network connection
HttpConnection hc = null;
try {
hc = (HttpConnection)Connector.open(url);
parse(hc.openInputStream());
}
catch (IOException ioe)
{
mRSSListener.exception(ioe);
}
finally
{
try
{
if (hc != null) hc.close();
}
catch (IOException ignored) {}
}
}
};
t.start(); }
// Blocking.
public void parse(InputStream in) throws IOException
{
Reader reader = new InputStreamReader(in);
XmlParser parser = new XmlParser(reader);
ParseEvent pe = null;
parser.skip();
parser.read(Xml.START_TAG, null, "scorecard");
boolean trucking = true;
boolean first = true;
while (trucking) {
pe = parser.read();
if (pe.getType() == Xml.START_TAG)
{
String name = pe.getName();
if (name.equals("currentinningsno"))
{
String currentinningsno, batteamname, bwlteamname, batteamruns, batteamwkts, batteamovers;
currentinningsno = batteamname = bwlteamname = batteamruns = batteamwkts = batteamovers = null;
while ((pe.getType() != Xml.END_TAG) || (pe.getName().equals(name) == false))
{
pe = parser.read();
if (pe.getType() == Xml.START_TAG && pe.getName().equals("currentinningsno"))
{
pe = parser.read();
currentinningsno = pe.getText();
}
if (pe.getType() == Xml.START_TAG && pe.getName().equals("batteamname"))
{
pe = parser.read();
batteamname = pe.getText();
}
if (pe.getType() == Xml.START_TAG && pe.getName().equals("bwlteamname"))
{
pe = parser.read();
bwlteamname = pe.getText();
}
else if (pe.getType() == Xml.START_TAG && pe.getName().equals("batteamruns"))
{
pe = parser.read();
batteamruns = pe.getText();
}
else if (pe.getType() == Xml.START_TAG && pe.getName().equals("batteamwkts"))
{
pe = parser.read();
batteamwkts = pe.getText();
}
else if (pe.getType() == Xml.START_TAG && pe.getName().equals("batteamovers"))
{
pe = parser.read();
batteamovers = pe.getText();
}
}
mRSSListener.itemParsed(currentinningsno, batteamname, bwlteamname, batteamruns, batteamwkts, batteamovers);
}
else {
while ((pe.getType() != Xml.END_TAG) || (pe.getName().equals(name) == false))
{
pe = parser.read();
}
}
}
if (pe.getType() == Xml.END_TAG && pe.getName().equals("scorecard"))
trucking = false;
}
}

My Listerner:
public interface RSSListener
{
public void itemParsed(String currentinningsno, String batteamname, String bwlteamname, String batteamruns, String batteamwkts, String batteamovers);
public void exception(java.io.IOException ioe);
}

My xml is:
<?xml version="1.0" standalone="yes" ?>
- <scorecard>
- <match type="TEST" state="complete" dayNbr="4">
<series>India in Zimbabwe, 2005 (Zimbabwe), 2005</series>
<home>Zimbabwe</home>
<away>India</away>
<venue>Queens Sports Club, Bulawayo</venue>
<toss winner="Zimbabwe" decision="Batting" />
- <result type="win">
<name>India</name>
<wonbyruns>90</wonbyruns>
<wonbywickets />
</result>
<manofmatch>Irfan Pathan</manofmatch>
</match>
<currentscores>
<currentinningsno>3</currentinningsno>
<batteamname>Zimbabwe</batteamname>
<bwlteamname>India</bwlteamname>
<batteamruns>185</batteamruns>
<batteamwkts>10</batteamwkts>
<batteamovers>47.5</batteamovers>

- <currbatsman> <name>Blessing Mahwire</name>
<runs>13</runs>
<balls>31</balls>
</currbatsman>
- <currbowler>
<name>Harbhajan Singh*</name>
<overs>15.5</overs>
<maidens>1</maidens>
<runs>59</runs>
<wickets>4</wickets>
</currbowler>
- <currbowler>
<name>Anil Kumble</name>
<overs>12</overs>
<maidens>2</maidens>
<runs>43</runs>
<wickets>1</wickets>
</currbowler>
<maxovers>90</maxovers>
<target>91</target>
</currentscores>
- </scorecard>

I just want to get the data from "currentscores" - only <currentinningsno>3</currentinningsno>
<batteamname>Zimbabwe</batteamname>
<bwlteamname>India</bwlteamname>
<batteamruns>185</batteamruns>
<batteamwkts>10</batteamwkts>
<batteamovers>47.5</batteamovers>
rows in that table.

Can any one help me to sort my problems.

Thanks in advance.

regards,
Sara