Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to reuse j2me kxml parser?
    primarykey
    data
    text
    <p>I am useing kxml parser for my j2me application. I am reading the file from phone memory and parsing the xml file to display the data(have various level of filter). On each filter i need to read the data from this file. For first time i created the parser and every time i re-assign this parser1(reference-original) to the paerser2(used to parse data). For first time i got the correct answer, but second time i haven't got the file content it shows null as data. </p> <p>Here is my code:</p> <pre><code>FileConnection fc = (FileConnection)Connector.open(rmsObj.rmsData.elementAt(0).toString()); InputStream in = fc.openInputStream(); InputStreamReader is = new InputStreamReader(in); commonAppObj.externParser = new XmlParser(is); </code></pre> <p>commonAppObj class file.</p> <pre><code>protected void fileread() { try { if(externParser != null){ parser = externParser; fileparser(parser); }else{ InputStream in = this.getClass().getResourceAsStream(this.dataBase); InputStreamReader is = new InputStreamReader(in); parser = new XmlParser(is); fileparser(parser); } } catch (IOException ioe) { } finally { parser = null; } } private void fileparser(XmlParser parser){ try { ParseEvent event = null; dataflag = 0; dataflagS = 0; System.out.println("findtags = " + findtags); while (((event = parser.read()).getType() != Xml.END_DOCUMENT) &amp;&amp; (dataflag != 1)) { if (event.getType() == Xml.START_TAG) { String name = event.getName(); if (name != null &amp;&amp; name.equals(findtags)) { dataflag = 0; parseAddressTag(parser); } name = null; } event = null; } } catch (IOException ioe) { } finally { parser = null; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload