I am getting the value from a web server. I am getting开发者_如何学Python the value as a string. Can anybody tell me how to convert the string to an xml file and where to store the xml file in android? And how do I access the file to parse the value, can anybody give an example?
Any help would be appreciated
Thanks in advance
In my understanding, Your meaning of "getting the value as string" is parse the content of InputStream. I think you don't have to parse the content and then convert the string to xml file, you can just use FileOuputStream to write the data in InputStream into file system.
You can use SAX or DOM to parse xml, they are both supported by android. See this post for more info.
Just pass the inputstream(response) from webserver to the Dom or Sax Methods no need to convert in to String
精彩评论