XML Question

  • Thread starter Thread starter Chris House
  • Start date Start date
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
 
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
 
Back
Top