Home >Backend Development >PHP Tutorial >How to use SQL 2000 to generate XML_PHP tutorial

How to use SQL 2000 to generate XML_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:01:21804browse

When introducing SQL2k before, I mentioned SQL2k's support for XML. Using the for XML statement, you can easily convert the execution result into an XML, which can greatly improve the system's operating efficiency and development speed. Detailed Please see Books Online for content.
But the way of accessing the returned XML using ADO (Required ADO 2.6) is different from the original Recordset. If you still use Recordset to access, you can only get an XML Schema in Unicode format, but not the XML content.
In fact, this problem can be solved easily, but I thought I was very familiar with ADO and didn't look at Help carefully, so I didn't find that ADO uses Stream to get and return XML.
The Command object has two properties, called Input Stream and Output Stream. The value of the property is an IUnknown interface. You can assign an XML Parser interface to it, or use Request, Response, etc. directly. The advantage of this is that there is no need to generate a Recordset or save the data, thus saving system overhead.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631166.htmlTechArticleWhen I introduced SQL2k before, I mentioned SQL2k’s support for XML. It can be easily done using the for XML statement. Convert the execution result into an XML, which can greatly improve the system...
Statement:
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