Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



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

Posts: 2
Name: Marcus
Trades: 0
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
 
 
Register now for full access!
Old 01-09-2008, 03:25 PM Re: Generate XML from mssql2005
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 01-11-2008, 11:23 AM Re: Generate XML from mssql2005
Junior Talker

Posts: 2
Name: Marcus
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.33791 seconds with 12 queries