April 2nd, 2013, 02:31 PM
FOR XML question - generating XML
I have a user table that have columns such as username, emailAddress, fullName etc.. (+ more columns)
My question is how can I use FOR XML EXPLICIT to generate XML format such as this:
The <MyElements> and <Item> tags have to be hardcoded.
I've been looking at some examples using FOR XML EXPLICIT, but I haven't really managed to generate such a result + the examples I saw all added attributes to the generated xml (which I dont want).
If anyone could give an example on how to generate this kind of XML I would greatly appreciate it.