Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 FOR XML AUTO, results formatting

Author  Topic 

tpk
Starting Member

10 Posts

Posted - 2002-08-10 : 17:12:10
I'm exporting to XML using the method shown at:

http://www.sqlxml.org/faqs.aspx?faq=29

Can anyone tell me how to change each results output from:

<item title="MyTitle1" description="My Description" link="My Link" />


To this:

<item>
<title>MyTitle1</title>
<description>My Description</description>
<link>My Link</link>
</item>

'item' is my table alias.

Thanks.

jasper_smith
SQL Server MVP &amp; SQLTeam MVY

846 Posts

Posted - 2002-08-10 : 17:51:55
Change FOR XML AUTO to FOR XML AUTO,ELEMENTS



HTH
Jasper Smith
Go to Top of Page
   

- Advertisement -