Home > Backend Development > XML/RSS Tutorial > Method to obtain the xml return structure of mssql

Method to obtain the xml return structure of mssql

黄舟
Release: 2017-03-02 17:09:27
Original
1688 people have browsed it

When the database is added for xml auto

Calling method

   SqlCommand SqlComm= new SqlCommand("Psp_ShowMarkerPRoduct",Db.SqlConn);
   XmlReader Xr= SqlComm.ExecuteXmlReader();
   XmlDocument xmlDoc=new XmlDocument();
   xmlDoc.Load(Xr);
   Xml1.Document=xmlDoc;
   SqlComm.Dispose();
Copy after login

Be sure to generate an xmldoc object, otherwise the system will prompt an error! Haha This damn error has confused me for a long time

xsl file

<?xml version="1.0" encoding="GB2312" ?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  ...
 </xsl:template>
</xsl:stylesheet>
Copy after login

The above is the content of the method of obtaining the xml return structure of mssql. For more related content, please pay attention to the PHP Chinese website ( www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template