获取mssql的xml返回结构的方法    

 

 
数据库在时回加for xml auto

调用方法
   SqlCommand SqlComm= new SqlCommand("Psp_ShowMarkerProduct",Db.SqlConn);
   XmlReader Xr= SqlComm.ExecuteXmlReader();
   XmlDocument xmlDoc=new XmlDocument();
   xmlDoc.Load(Xr);
   Xml1.Document=xmlDoc;
   SqlComm.Dispose();

一定要生成xmldoc对象 否则系统提示错误!呵呵  这个该死的错误 困惑了我好久

xsl文件

 http://www.w3.org/1999/XSL/Transform" version="1.0">
  ...
 

 

关联文档