I return an InputStream from an InputConnection.
Then I create an instance of kXMLParser and use the use the setInput function and pass the InputStream to it.
But as soon as I call one of the parsers of function like .next() it just hangs. It is as if it doesnt read the XML.
Here is my code:
inConn = (InputConnection)Connector.open (getURL,Connector.READ,false);
inStream = inConn.openInputStream();
KXmlParser parser = new KXmlParser();
parser.setInput(new InputStreamReader(inStream));
int eventType = KXmlParser.START_TAG;
while (eventType != KXmlParser.END_DOCUMENT) {
eventType = parser.next();
System.out.println(parser.getName());
}
What am I doing wrong?
Please help!!
Mark

Reply With Quote

