XML Question

C

Chris House

Here's the deal - I'm working on a project in which a customer will be
sending us orders in the form of an XML file, which we'll then parse,
complete the work on and then return as an XML file. I've already completed
the part of the project that needs to parse the XML and found that to be
pretty straight forward (for my first go at working with XML anyway). Now I
need to extract the necessary data from our database and create an XML file
to return to the customer. The customer has given us exact specs on the
layout of the XML and I'm not quite sure on how I need to go about
transforming our data to their XML format. Anyone have any suggestions on
what the best approach would be? Our data is stored in a SQL Server 2000
database, so I don't know if SQL 2000's XML capabilities make this any
easier.

Thanks in advance!

Chris
 
T

Thys Brits

Chris,

I'd suggest, depending on how complex the XML structure that you must supply to the client is, you look at using FOR XML EXPLICIT
in SQL. This is very powerful, and can return XML to you in exactly the format you specify. Check in the Index of SQL Books Online
for FOR XML, you should find what you're looking for.

Thys Brits
MCSD/MCSD.Net

Here's the deal - I'm working on a project in which a customer will be
sending us orders in the form of an XML file, which we'll then parse,
complete the work on and then return as an XML file. I've already completed
the part of the project that needs to parse the XML and found that to be
pretty straight forward (for my first go at working with XML anyway). Now I
need to extract the necessary data from our database and create an XML file
to return to the customer. The customer has given us exact specs on the
layout of the XML and I'm not quite sure on how I need to go about
transforming our data to their XML format. Anyone have any suggestions on
what the best approach would be? Our data is stored in a SQL Server 2000
database, so I don't know if SQL 2000's XML capabilities make this any
easier.

Thanks in advance!

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top