Parse xml data which is stored as string
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http开发者_运维百科://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><loginResponse xmlns="https://comm1.get.com/"><loginResult>true</loginResult><result>success</result></loginResponse></soap:Body></soap:Envelope>
Is there a way to parse a string which has xml data?
i want to get the result success
This is a SOAP response and you might want to try this library: http://ksoap2.sourceforge.net/
It claims to be useful for small / limited environments like phones.
If you can use it then there is no need to write another parser in SAX,DOM,Xmlpull etc etc.
Since you have a very small xml to parse its better to use dom parser here.
Also refer SAXParser
精彩评论