Reputation: 1
I have an XElement which is having special char \u0002 in it and when I am doing XElement.ToString() its throwing error.
XElement Text:
Party B represents to Party A that it [is] [is not] a “financial end user” as such term is defined by the Commodity Futures Trading Commission (17 CFR §23.151). If we have, or are putting in place, a regulatory compliant VM CSA with the counterparty, this provision is notrequired. In the situation where there is no regulatory compliant
c# code:
var str = xelement.ToString();
Exception:
System.ArgumentException: ''', hexadecimal value 0x02, is an invalid character.'
Let me know if any other workaround. I just wanted to convert complete xelement to base64 encoded value.
Upvotes: 0
Views: 24