Hi,
I have a XML document, loaded by
XmlDocument xDoc = new XmlDocument();
xDoc.Load("my.xml");
xPath = xmlKeyName;
XmlNode xNode = xDoc.SelectSingleNode(xPath);
Then I will assign some value to one certain key by:
xNode.InnerXml = "<displayName>" + Name + "</displayName>";
If there are some special characters in my string "Name", such as "&",
"<" or ">", program will raise error. Is there a way I can use to encode all
special characters to eliminate potential problems?
--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy