1
<Translation> (  benzene  OR  pyrobenzole  OR  pyrobenzol  OR  &quot;phenyl      hydride&quot;              OR  phene  OR  &quot;fenzen  czech  &quot;  cyclohexatriene  &quot;coal  naphtha&quot;  OR  &quot;benzolo  italian  &quot;  benzole  benzol  &quot;benzen  polish  &quot;  &quot;benzeen  dutch  &quot;  ) The chemical name <b>benzene</b> was identified.<br>The following terms were added from ChemIDplus:<br><b>pyrobenzole</b><br><b>pyrobenzol</b><br><b>phenyl hydride</b><br><b>phene</b><br><b>fenzen  czech </b><br><b>cyclohexatriene</b><br><b>coal naphtha</b><br><b>benzolo  italian </b><br><b>benzole</b><br><b>benzol</b><br><b>benzen  polish </b><br><b>benzeen  dutch </b><br>CAS Registry Number: <b>71-43-2</b><br></Translation>

我从 Web 服务获取字符串,它不会在 cdata 部分发送 html。我得到的错误是: System.Xml.XmlException: The 'br' start tag on line 1 does not match the end tag

我正在使用 .net 3.5、webclient 来使用 REST Web 服务。

4

1 回答 1

0

我知道这个问题。我可以通过包含 HTML 的命名空间来解决它。

xmlns="http://www.w3.org/1999/xhtml"

将针对所有空元素(如<br /><hr />等)引发此错误<input />

于 2013-04-18T12:38:13.593 回答