I was looking for something a little different - I embed sql in xml using cdata in my own selected element named 'sql'
Just to clarify the contents of cdata will be read transparently.
if you do
var cdataContent = sql.Value;
you get any line in
<![CDATA[..]]>
without having to instantiate another type of node on top of it or do something fantastic
therefore, in the above case, cdataContent will just be "..".
Linq to sql is really nice! I always expect that there will be more messing around. Hats for the guys who made this API.
source share