How to decode string to XML string in C#

后端 未结 7 1547
挽巷
挽巷 2020-11-27 20:41

I have a string (from a CDATA element) that contains description of XML. I need to decode this string into a new string that displays the characters correctly using C#

7条回答
  •  执念已碎
    2020-11-27 21:15

    You can use System.Net.WebUtility.HtmlDecode instead of HttpUtility.HtmlDecode

    Useful if you don't want System.Web reference and prefer System.Net instead.

提交回复
热议问题