If you have this XML:
<people>
<person id="1">
<firstname>John</firstname>
<surname>Doe</surname>
</person>
<person id="2">
<firstname>Mary</firstname>
<surname>Jane</surname>
</person>
</people>
And you wanted this table:
id firstname surname
--- ---------- ----------
1 John Doe
2 Mary Jane
How would you get it there, using T-SQLXML?
And to throw a spanner into the mix: Lets say you know the depth of the <person>
, <firstname>
and <surname>
elements, but you don't know what they're called!
Feel free to flame if you think this is better posted to reddit :)