http://topic.csdn.net/u/20080905/10/caea1689-4582-417a-8723-d008a3ae1a10.html?550638422
tringBuilder sb = new StringBuilder();
sb.Append(" <?xml version=\"1.0\"?> ");
sb.Append(" <root> ");
sb.Append(" <test value=\"| \"/> ");
sb.Append(" </root> ");
XmlDocument d = new XmlDocument();
try
{
d.LoadXml(sb.ToString());
MessageBox.Show("OK");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
d = null;
sb = null;
}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/carl2380/archive/2010/01/17/5203558.aspx