Reply
Generate XML from mssql2005
Old 01-09-2008, 08:15 AM Generate XML from mssql2005
Junior Talker

Posts: 2
Name: Marcus
I want to create a procedure that generates the following format for a XML response.

<row>
<field name="nr">99</field>
<field name="namn">test bolag</field>
</row>
<row>
<field name="nr">98</field>
<field name="namn">test bolag 2</field>
</row>
MacW is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 01-09-2008, 02:25 PM Re: Generate XML from mssql2005
Learning Newbie's Avatar
Moderator

Latest Blog Post:
Dick Cheney as a Web Comic
Posts: 4,696
Name: John Alexander
Well if you don't want to do SELECT FOR XML and use XSLT, you could do

SELECT '<row>' + chr(13) + '<field name='nr'>' + nr + '</field>' and so on.
__________________
4 ways to improve the lives of the "bottom billion"

"HEY YOU KIDS GET OFF MY LAWN!" -John McCain
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 01-11-2008, 10:23 AM Re: Generate XML from mssql2005
Junior Talker

Posts: 2
Name: Marcus
And if I want to use FOR XML, is there a way to alter the tags?
MacW is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Generate XML from mssql2005
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11184 seconds with 13 queries