Android 从xml解析响应
我是webservices新手,我想解析这个xml并将响应(stringval)存储在一个局部变量中。我该怎么做?请大家发表一下这篇文章的代码片段Android 从xml解析响应,android,web-services,parsing,response,Android,Web Services,Parsing,Response,我是webservices新手,我想解析这个xml并将响应(stringval)存储在一个局部变量中。我该怎么做?请大家发表一下这篇文章的代码片段 HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.or
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RegisterUserResponse xmlns="http://tempuri.org/">
<RegisterUserResult>string</RegisterUserResult>
</RegisterUserResponse>
</soap:Body>
</soap:Envelope>
HTTP/1.1200正常
内容类型:text/xml;字符集=utf-8
内容长度:长度
一串
Android本身有很多解析技术:、DOM解析器和。您可以实现任何功能
以下是学习XML解析的最佳示例:
否则,您应该尝试使用以下链接进行谷歌搜索:您可以使用SAX、DOM或pull解析器。按照教程的链接进行操作
你应该能够在谷歌文档中找到你需要的关于Android的任何东西。这里有一个链接: