try the following (did not test, so there might be errors):using System.Xml;XmlDataDocument xdd = new XmlDataDocument(YourDataSet1);
XmlProcessingInstruction pi = xdd.CreateProcessingInstruction("xml-stylesheet","type='text/xsl' href='style.xsl'");
xdd.InsertBefore( pi, xdd.DocumentElement);
xdd.Save("YourXMLFileName");
XmlProcessingInstruction pi = xdd.CreateProcessingInstruction("xml-stylesheet","type='text/xsl' href='style.xsl'");
xdd.InsertBefore( pi, xdd.DocumentElement);
xdd.Save("YourXMLFileName");
解决方案 »
- 求助,在线等 gridview
- jQuery中有没有和C#中DataTable.Select()类似的方法
- 未能找到名为“ASP.Net”的权限集
- 求表达式?
- 小弟跪求NHibernate 1.2 beat版 c#.net 配置
- VS.net2003如何做美工?谈谈你们经验~
- datagrid导出excel如何将隐藏列也导出
- 跪请各位高手!!!!
- 请问一个FlyTreeview控件使用的问题!如何才能控制节点上级下级节点移动!!
- 用DataList怎样做这样的分页?
- 关于日历控件选择年份的问题.
- onclick 和 onserverclick有什么区别,请举例说一下。在用代码创建的button中,怎样设置onclick事件。
xdd.InsertBefore( pi, xdd.DocumentElement);这一行有问题在尝试使用 XML 操作编辑 XmlDataDocument 之前请设置 DataSet.EnforceConstraints == false。 请指教……谢谢
XmlDataDocument xdd = new XmlDataDocument(YourDataSet1);
.....
May u a happy time :)