How to edit an XML file in JavaME using kXML?
kXML is开发者_StackOverflow社区 an alternative XML parser I chose to use for JavaME apps.
The XML file to be editted is inside the mobile app's own JAR. I'm using CLDC profile.
Please help
You WILL NOT be able to modify anything that is in the mobile application JAR file.
You need to create a modified copy of the file and store it in an area you can write to (presumably, on the mobile phone file system).
if i understand your problem, you want to parse xml file that is present in your apps jar. try this.
InputStream in = this.getClass().getResourceAsStream("/sample.xml");
InputStreamReader is = new InputStreamReader(in);
KXmlParser parser = new KXmlParser();
parser.setInput(is);
but if you want to make changes in that file, i think its not possible.
精彩评论