开发者

How to edit an XML file in JavaME using kXML?

开发者 https://www.devze.com 2022-12-31 21:11 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消