我有这个字符串:XML解析iPhone
<?xml version="1.0" encoding="UTF-8"?>
SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:methods" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:PingdomAPI" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:createAccountResponse><return xsi:type="ns2:CreateAccountResponse"><status xsi:type="xsd:int">3</status><password xsi:nil="true"/></return></ns1:createAccountResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
的问题是:如何提取的3 int值,对于状态值。
由于性能问题,NSXML仅适用于模拟器,但不适用于设备本身 – Mladen 2009-12-10 16:08:24
您是正确的MLaden,但rjstelling的示例使用NSXMLParser,它在设备上可用。 – philsquared 2009-12-10 16:10:39
我将如何实现这个我的问题。我建议我将addressParser初始化为字符串的内容而不是URL。但如何提取关键“状态”的int值? – Mladen 2009-12-10 16:19:30