Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an XML Document from scratch

Status
Not open for further replies.

Craftor

Programmer
Feb 1, 2001
420
NZ
Hi all

We've been told that we can no longer use SQL 2000's FOR XML EXPLICIT (the customer only has SQL 7) and must change all our SPs to return a recordset.

Is it feasable to write a 'translation' function (not necessarily generic) to take the recordset now returned and parse it into an XML document so that we don't have to make too many coding chages? My idea is to loop through the recordset and match the various fields to the required XML node - much like the original SP would have done. We will have to do some XML parsing eventually as it is a requirement for certain functions to return XML (which we are currently formatting througn XSLT).

I'm using ASP .NET with C# - what are your thoughts on this? Should I take some time to write my translation functions or is it a waste?

Thanks as always

Craftor
:cool:

PS: If anyone feels this would be better placed in another forum, please let me know.
 
Hey Craftor,

On the surface, it appears to me that translating your recordset to an XML object would be quite easy. I think you should take the time to write the functions - it will not only help you on this project, but if you aren't fluent with XML right now, it seems to be a good way to get up to speed.

There are some good samples of writing an XML doc in the .NET IDE help. If you have any questions, shoot them my way. Otherwise, good luck.

Later. SAcheson. (SAcheson@slb.com)

FYI - I'm a C#, .NET, and XML guy ... not so keen on ASP. If there's a complexity layer I'm missing by adding ASP into the equasion, my apologies.
 
Hi SAcheson

Thanks for the response. I decided to take the plunge and do it - not as easy as it looked on the surface ;-) but, as you say, it's getting me VERY fluent with XML.

Thanks

Craftor

:cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top