开发者

getting stringXmlContent and write then saved in to .xml file stored in sdcard in android how can possible?

开发者 https://www.devze.com 2023-03-12 14:30 出处:网络
I am implementing read and write xml in resource folder. Reading is ok, how can I modify this xml file save as sdcard:

I am implementing read and write xml in resource folder. Reading is ok, how can I modify this xml file save as sdcard:

EditText myXmlContent = (EditText)findViewById(R.id.my_xml);
String stringXmlContent;
try {
    stringXmlContent = getEventsFromAnXML(this);
    myXmlContent.setText(stringXmlContent);
} catch (XmlPullParserException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

I am getting stringXmlContent. 开发者_如何学运维How can stringXmlContent be converted in to an xml file saved in sdcard?


Why you don't use XMLParse or DOM

0

精彩评论

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