2010-11-26 77 views
0
<?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> 

是否有解析具有xml数据的字符串的方法?解析存储为字符串的xml数据

我想既然你有一个非常小的XML解析它能够更好地在这里使用dom parser得到结果成功

回答

1

这是一个SOAP响应,你可能会想尝试这个库:http://ksoap2.sourceforge.net/

它声称对小/有限的环境中,如手机是有用的。

如果你可以使用它那么就没有必要写在SAX,DOM,Xmlpull等等等等另一个解析器