SAMPLE: How To Retrieve XML Data Using an XPath Query with ADO in Visual C++
This article was previously published under Q271782 On This PageSUMMARY XPath.exe demonstrates how to extract an XML stream from a
SQL Server 2000 database by using an XPath query and ADO in Visual C++.
MORE INFORMATIONThe
following file is available for download from the Microsoft Download
Center: XPath.exe (http://download.microsoft.com/download/mdac26/utility/2.8/win98/en-us/xpath.exe) Release Date:
10-04-2000For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591 (http://support.microsoft.com/kb/119591/EN-US/) How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
The XPath.exe file contains the following files:
This sample demonstrates how to run an XPath query to output an XML stream. The sample shows how to configure an ADO Command object to run an XPath query by using the Command object's CommandText property. Alternatively, you can do this by using the CommandStream property and an input Stream as well. Additionally, the sample provides a mapping schema file that contains mapping information between elements and attributes in the XPath query and the tables and columns contained in the back-end SQL Server 2000 relational database management system (RDBMS). The CustomerOrder.xml mapping schema file provided with this sample contains information about a SQL JOIN between the Customers and Orders tables and their columns in terms of the Customers and CustOrder elements and their attributes. All the tables are from the Northwind sample database in SQL Server 2000. The sample does the following:
Steps to Run the Sample
REFERENCES
For more information about XPATH query and XML, click the following article numbers to view the articles in the Microsoft Knowledge Base:
271780 (http://support.microsoft.com/kb/271780/EN-US/) SAMPLE: How To Retrieve XML Data using a SQL XML Query with ADO in Visual C++
271775 (http://support.microsoft.com/kb/271775/EN-US/) SAMPLE: How To Retrieve Relational Data Using OpenXML with ADO in Visual C++
272180 (http://support.microsoft.com/kb/272180/EN-US/) SAMPLE: How to Retrieve XML Data Using a Template File with ADO in Visual C++
%1 (http://support.microsoft.com/kb/%1/EN-US/) %2
SQL Server 2000 Books OnLine ADO 2.6 Documentation
APPLIES TO
| Article Translations
|

Back to the top
