XML | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive


What is the usual process to get the data out of sql server in XML that meets a DTD?
Check thruhttp://www.sqlxml.org for details.
And also books online (Sp3) updated, I believe some information can be found. _________
Satya SKJ

does anyone have any personal work experience for me on this?

If you’re using .NET then I’d suggest using that to write an app that creates the xml. Reason being that it’s incredibly simple to make a dataset containing multiple datatables then setup the relationship between those tables and the output of the xml. You’ve then got then a single command to serialise the xml to a file. It’s also very quick.
but we only have one database.

The SELECT … FOR XML EXPLICIT allows precise control over the creation of an XML dom… It can be quit a lenghty process for complex xml. I prefer to break it up for each element and insert the results into a table variable, then I can plug and play element more easily and debug the procedure. The alternative being multiple union all statements I’d agree with Dave that if you are using .NET and you need to produce relatively complex xml, then client side might be much easier… although the for xml will still work Cheers