I usually use kXML library to parse XML on J2ME devices. I tried it on Nokia 12/i. In concept simulator it works fine, but when I start my IMLet on a physical device my IMLet stops without even throwing any exception. It seems to me that it stops as soon as I try to instance a class that uses kXML. I tried different versions of kXML, but the result is almost the same.
Does anybody know if there is a specific problem with this library on Nokia 12? Are there XML parsing libraries tested on Nokia 12?
I have all necessary classes in my jar. More, in simulator it works fine. When, instead, i load my jar to Nokia 12 it runs well until the method calling these classes is invoked.
Then the IMlet stops without throwing any exception even if my code is all inside try/catch. I'm using the last version of kXML2. What version was you know to be working?
Here is the code for XML Dom parsing I use:
// New imut stream from a string
StringReader xml = new StringReader(XmlExample);
// creates a kXML parser from an InputStreamReader
KXmlParser parser = new KXmlParser();
//parser.setFeature (XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
// Create a document, which will hold the XML tree.
Document doc = new Document();
// When the call to parse exits the entire document has been
// loaded into memory
Element root = doc.getRootElement();
int ChildCount = root.getChildCount();
for (int i = 0; i < ChildCount ; i++ )
Element kid = root.getElement(i);