Groups | Blog | Home
all groups > dotnet xml > may 2004 >

dotnet xml : SQL to XML to XSL



K Bryan
5/7/2004 12:04:45 PM
Hi there,

I'm a little stuck and would appreciate ANY help getting over this hurdle.

Let's say that I've got a SQL Server stored procedure that includes FOR XML
AUTO, ELEMENTS

And that within a .Net Web Form, I'd like to call that stored procedure and
then apply an .XSLT file to it.

What would the code look like to do that?

Any help would be GREATLY appreciated.


Thanks,

_K

Cowboy
5/7/2004 1:32:08 PM
http://www.wiley.com/extras

Look for ADO.NET and XML: ASP.NET on the Edge

Download the sample code for the last three chapters. There is an example in
there on how to do an XSLT transform directly to the HTTP stream using XML
from SQL Server.

A couple of notes:
1. By default, SQL Server does not add a <root> element if you do not
specify the root. Make sure you have a <root> or you will not have valid XML
2. The code samples are 1.0, so may need a tweak or two. The methodology is
basically sound. I add this caveat as Microsoft broke some of the XML
functionality moving to 1.1

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
[quoted text, click to view]

AddThis Social Bookmark Button