I am wondering how to obtain the following from a query using xml on sql server 2008.
I need:
1. The XML Version
2. The xmlns
3. And one parent node called "Brand" containing many child nodes called "Name"
Also I tried …For XML Auto but that give me the node
<Brands Name="nameofBrand">
Instead I need
<Brand><Name>nameofbrand</Name></Brand>
EDIT:
The query is quite simple for now….
Select Distinct
Name
From
Brands
For XML AUTO
Here is a query that gets a name list in brands node. I do not understand what you want to do with version or xmlns.