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
 General SQL Server Forums
 New to SQL Server Programming
 ROOT ELEMENT in SS 2000

Author  Topic 

avmreddy17
Posting Yak Master

180 Posts

Posted - 2008-08-19 : 18:42:41
Is there a way to rename the Root Element in SQL Server 2000.
In 2005 we can specify some thing like this ROOT('test')

Thx

nathans
Aged Yak Warrior

938 Posts

Posted - 2008-08-19 : 21:55:27
Read up on FOR XML EXPLICIT.

In 2000 you can do:

select 1 as tag,
null as parent,
null as [RootList!1],
null as [User!2!ID],
null as [User!2!UserName],
...


which would result in:

<RootList>
<User ID="1" UserName="yak@yak.com"></User>
</RootList>




Nathan Skerl
Go to Top of Page
   

- Advertisement -