开发者

Parser issue in android

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

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

0

精彩评论

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

关注公众号