Home > Article > Backend Development > Method to obtain the xml return structure of mssql
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();
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>
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)!