question

Steve Jones - Editor avatar image
Steve Jones - Editor asked

Generate XML from SQL Server

What are my options for returning XML to a client application from SQL Server? I have an XSD that I want to apply to some data, but don't want to build the XML from a result set if I can avoid it.

t-sqlxml
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Jorge Segarra avatar image
Jorge Segarra answered

This article at Simple-Talk goes over XML pretty well. You should be able to extrapolate your answer from there:

http://www.simple-talk.com/sql/learn-sql-server/sql-server-xml-cribsheet/

You can also get lots of help from the MSDN forums on XML:

http://social.msdn.microsoft.com/Forums/en/sqlxml/threads

And for brevety's sake, here's the BOL link to XML in SQL 2005

http://msdn.microsoft.com/en-us/library/ms345110%28SQL.90%29.aspx

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.