【发布时间】:2011-10-15 19:40:25
【问题描述】:
我对 XMLReader 的输出有疑问,它应该能够将任何 SOAP-Result 解析为 NSDictionary。
当我查看结果时,我得到以下信息:
键:soapEnvelope,值:{xml 文件的其余部分到最后,带有所有标签,但它似乎是一个长字符串}
我在这里做错了什么,因为我希望得到一个以我所有的 XML-Tags 作为键的 NSDictionary?
编辑:由于我一直在努力理解这一点,所以我可能完全走错了方向,所以如果可能的话......这是我的 XML:
<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>
<GetData2Response xmlns="http://tempuri.org/">
<GetData2Result>
<NoOfObjectsDetected>1</NoOfObjectsDetected>
<RectanglesForPicture>
<Rectangle>
<Location>
<X>90</X>
<Y>14</Y>
</Location>
<Size>
<Width>352</Width>
<Height>352</Height>
</Size>
<X>90</X>
<Y>14</Y>
<Width>352</Width>
<Height>352</Height>
</Rectangle>
</RectanglesForPicture>
<ReturnMessage>Juhu!</ReturnMessage>
</GetData2Result>
</GetData2Response>
</soap:Body>
当我想让我们在 int 中说 NoOfObjectsDetected 时 - 我到底要做什么? (这很愚蠢,我知道……但我迷路了……谢谢)
【问题讨论】:
标签: iphone soap xml-parsing xmlreader