3

我正在尝试使用 XML 标记中的以下 HTML 格式标记解析在线 XML:

<synopsis>
  <!--[CDATA[&lt;p&gt;
&lt;span style=&quot;color: rgb(0, 0, 0); font-family: arial; font-size: 13px; white-space: pre-wrap;&quot;&gt;Yeh Jawaani Hai Deewani is a story of the exhilarating and terrifying journey of four characters &amp;ndash; Bunny, Naina, Aditi and Avi, as they navigate through their youth; from their carefree laughter as they set off on a holiday together in their colleges days, until their bittersweet tears as they watch the first of their bunch get married.&lt;/span&gt;&lt;/p&gt;]]-->
</synopsis>

“概要”标签之间的内容被编码为 HTML。它想在我的 WebView 中显示带有 HTML 格式的内容,因此我在解析时将此值存储在 arrya 中,然后从 arra 中检索为 NSString 并将 WebView loadHTMLString 与该字符串变量一起使用。但内容没有以 HTML 格式显示;它在概要标签中显示。

编辑:

这是在 XML 概要标记中编码之前的 HTML 内容:

<synopsis>
<body style=\"background:black;\">
<p>
<span style=\"color: rgb(255, 255, 255); font-family: arial; font-size: 13px; white-space: pre-wrap;\">Yeh Jawaani Hai Deewani is a story of the exhilarating and terrifying journey of four characters &ndash; Bunny, Naina, Aditi and Avi, as they navigate through their youth from their carefree laughter as they set off on a holiday together in their colleges days, until their bittersweet tears as they watch the first of their bunch get married.
</span>
</p>
</body>
</synopsis>

我想解析“概要”标签之间的数据,但无法做到。

4

0 回答 0