x

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.

more ▼

asked Oct 19 '09 at 11:11 AM in Default

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 76 79 82

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Oct 19 '09 at 11:14 AM

Jorge Segarra gravatar image

Jorge Segarra
419 2

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x977
x136

asked: Oct 19 '09 at 11:11 AM

Seen: 1699 times

Last Updated: Oct 19 '09 at 11:11 AM