Error in parsing xml from web service
I have my xml file as a response in result.getProperty(0)
开发者_开发百科.
The code is as follows:
SoapObject result=(SoapObject)envelope.bodyIn;
System.out.println("value of result " + result);
How can I store this xml in result.getProperty(0)
into my sdcard/any other location so that I can parse it using SAXParser?
Regards,
snehaThe getProperty(int)
-method returns an Object. If this Object is a String, the SAXParser supports parsing XML from a String: Link
I solved the problem in the following way :
xr.parse(new InputSource(new ByteArrayInputStream(result.getProperty(0).toString().getBytes())));
Then I use SAXParser and parse the xml.
Thanks,
Sneha
精彩评论