Thursday, July 30, 2009

How do i use a xsd document to extract data from a MSSQL server db and create a XML file of that using C#.net?

Hi,


I have created a XSD file now I want to use it in MS VS .net 2003/ 2005 to extract data from multiple tables like customes and their orders and the bills for those orders and create an XML file based on the structures setup in XSD . Would like to c a working example on the net if possible could someone pls guide me . I require to create an executable so any one can use it I have another utility wherein they can modify the xsd as per the requirements .


Many thanks


Meherdad

How do i use a xsd document to extract data from a MSSQL server db and create a XML file of that using C#.net?
try running this sample query against your db and check out the output. It will output the data in XML format. This will hopefully give you a start. Unfortunatly I don't have any C# code for you.





select *


from orders


for xml auto, elements





here is a good tutorial on the basics of getting data from SQL server in XML format and using XML schemas





http://sqljunkies.com/Article/53969753-E...

hawthorn

No comments:

Post a Comment