To encode string which has XML special characters so that it can be inserted as valid text into xml node, you can use the following API in System.Security namespace.
string s = System.Security.SecurityElement.Escape("<>&");
This will produce the following output:
<>&
Labels: DotNet, xml
0 Comments:
Post a Comment
<< Home