开发者

how to save the xml tag result when we click on the save button?

开发者 https://www.devze.com 2023-04-09 22:19 出处:网络
hi all i have xml code like below <root> <key> <Question>Is the color of the car</Question>

hi all i have xml code like below

<root>
<key>
<Question>Is the color of the car</Question>
<Ans>black?</Ans>
</key>
<key>
<Question>Is the color of the car</Question>
<Ans>black?</Ans>
</key>
<key>
<Question>Is the news paper </Question>
<Ans>wallstreet?</Ans>
</key>
<key>
<Question>fragrance odor</Question>
<Ans>Lavendor?</Ans>
</key>
<key>
<Question>Is the baggage collector available</Question>
<Ans></Ans>
</key>
</root>

Display on the screen as:

List form Is the color of the car black? Check box Is the baggage collector available? Check box

if the check box is checked - Yes o开发者_运维知识库therwise vlaue is no. on save button: we need to save it into a xml file

here i am getting question with answer when i am checked but my problem is how to save checked list items into the xml file after click on the save button so give me the solution any one of you.


You may refer to the [Creating XML] section in [Working with XML on Android] at http://www.ibm.com/developerworks/opensource/library/x-android/index.html. Once you have the XML generated, you can save it to a file with the help of File and Stream classes.

0

精彩评论

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