Tag: cdata

CData不被NSXmlparserparsing

我收到来自服务的xmlforms的响应,我使用nsxmlparser进行parsing。 在一个实例中,我收到了一个xml,其中两个标签中的内容是相同的(重复项如下面的xml) 收到的Xml: <UserGeneratedContentItem> <link rel="details" uri="http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/16046" /> <Data><![CDATA[<Type>Note</Type><Description>**6000 characters**</Description><Page>6</Page><ChapterNumber>1</ChapterNumber><ChapterTitle>Etikk og filosofi</ChapterTitle><Uri>http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/6</Uri><Data><StickyNotes><StickyNote name="icon_2" X="215.8" Y="352.7" note="**6000 characters**" dateTime="null" popupX="940" popupY="119" popupWidth="300" popupHeight="180" formatedDate ="2012-12-28-18-20-47" iconImage="1003"/></StickyNotes></Data>]]></Data> </UserGeneratedContentItem> <UserGeneratedContentItem> <link rel="details" uri="http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/16046" /> <Data><![CDATA[<Type>Note</Type><Description>**6000 characters**</Description><Page>6</Page><ChapterNumber>1</ChapterNumber><ChapterTitle>Etikk og filosofi</ChapterTitle><Uri>http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/6</Uri><Data><StickyNotes><StickyNote name="icon_2" X="215.8" Y="352.7" note="**6000 characters**" dateTime="null" popupX="940" popupY="119" popupWidth="300" popupHeight="180" formatedDate ="2012-12-28-18-20-47" iconImage="1003"/></StickyNotes></Data>]]></Data> </UserGeneratedContentItem> 6000个字符包括将被编码的字母,算术和一般标点符号。 概率: 在 – (void)分析器中:(NSXMLParser *)parsing器foundCDATA:(NSData […]