我收到一个 XML 作为 Web 服务的响应。此 xml 中的一个标签实际上包含 Web 服务作为流发送的文档的内容。如果我尝试在解析为 NSString 后提取文档,然后将其转换为 NSData 以加载到 webView 中,则 UIwebView 无法显示文档并引发错误:
EXCEPTION CPMessageException: (null)
下面是我作为响应得到的 xml 示例(我无法提供确切的 xml,因为它是机密的):
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns6:BinaryContent" pageModifier="" pageNumber="0" format="msw8"><ns6:renditionType>PRIMARY</ns6:renditionType><ns6:Value>0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAAvAAAAAAAAAAAEAAAvwAAAAEAAAD+////AAAAALoAAAC7AAAA///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////spcEABYAJBAAA+BK/AAAAAAAAEAAAAAAACAAAT0oAAA4AYmpiahr3GvcAAAAAAAAAAAAAAAAAAAAAAAAJBBYAOFoAAHidAAB4nQAAQUIAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8AAAAAAAAAAAD//w8AAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAALcAAAAAAO4bAAAAAAAA7hsAAGAoAAAAAAAAYCgAAAAAAABgKAAAAAAAAGAoAAAAAAAAYCgAABQAAAAAAAAAAAAAAP////8AAAAAdCgAAAAAAAB0KAAAAAAAAHQoAAA4AAAArCgAAAwAAAC4KAAANAAAAHQoAAAAAAAAyz4AAGYBAADsKAAAAAAAAOwoAAAAAAAA7CgAAAAAAADsKAAAAAAAAOwoAAAAAAAAHCsAAAAAAAAcKwAAAAAAABwrAAAAAAAASj4AAAIAAABMPgAAAAAAAEw+AAAAAAAATD4AAAAAAABMPgAAAAAAAEw+AAAAAAAATD4AACQAAAAxQAAAogIAANNCAABaAAAAcD4AABUAAAAAAAAAAAAAAAAAAAAAAAAAYCgAAAAAAAAcKwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcKwAAAAAAABwrAAAAAAAAHCsAAAAAAAAcKwAAAAAAAHA+AAAAAAAAAAAAAAAAAABgKAAAAAAAAGAoAAAAAAAA7CgAAAAAAAAAAAAAAAAAAOwoAAAwAgAAhT4AABYAAABaLAAAAAAAAFosAAAAAAAAWiwAAAAAAAAcKwAAygAAAGAoAAAAAAAA7CgAAAAAAABgKAAAAAAAAOwoAAAAAAAASj4AAAAAAAAAAAAAAAAAAFosAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHCsAAAAAAABKPgAAAAAAAAAAAAAAAAAAWiwAAAAAAABaLAAApgEAAJY7AACMAQAAAAAAA</ns6:Value></content></S:Body></S:Envelope>
我需要提取<ns6:Value>
,它实际上是一个文档的内容,并在 UIwebView 中显示它。我需要一些指导。