我有一个字符串(来自CDATA元素),其中包含XML的描述。 我需要将此字符串解码为一个新字符串,以使用C#正确显示字符。
现有字符串:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><myreport xmlns="http://test.com/rules/client"><admin><ordernumber>123</ordernumber><state>NY</state></report></myreport>
需要的字符串:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<myreport xmlns="http://test.com/rules/client">
<admin><ordernumber>123</ordernumber><state>NY</state></report></myreport>
HtmlDecode
不起作用,因为它只接受string
。我只是想指出我们的OP也需要转义"
。 - naveen