XmlDocument.LoadXML+如何构造xml字符串
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;
}
相关文档:
1、mian.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="HTTPSrv.send();" width="242" height="442">
<mx:Script>
<!--[CDATA[
import mx.rpc.events.ResultEv ......
xml文件如下:<?xml version="1.0" encoding="gb2312"?>
<软件管理系统>
<管理员>
<用户名>明日科技</用户名>
<密码>123456</密码>
<地址>长春市</地址>
</管理员>
<管理员>
<用户名>明日软件</用户名 ......
这个例子要把bookstore.xml文件增加一条book记录
1 bookstore.xml
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="love" ISBN="1234123">
<title>who am i </title>
<author>who</author>
  ......
http://topic.csdn.net/t/20021102/16/1142056.html
use classes in System.Xml namespace, for example (assume your xml is in string s and it contains an xmlns definition) ......