|
Posted by Tony Rogerson on 11/01/07 05:40
> Nah, I think text() + FOR XML certainly has the flavour of a kludge over
> it. The syntax is anything about intuitive, and if the data include
> ampersands or angle brackets, there are a few surprising waiting for us.
I disagree, true - it's unintuitive to relational folk but isn't most XML.
This the XML side of the SQL Server data engine and until you start learning
how it works, syntax etc... then I guess anything to do with XML is a
kludge.
The ampersand and angle brackets are not suprises, books online tells us
what the behaviour is, ampersand and square brackets both have meaning
within the XML which is what text() is giving us.
Tony.
--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
Navigation:
[Reply to this message]
|