Hello,
Unfortunately, problems of this site just piling up.
The problem with CDATA section in the source code is not resolved for a year plus. I reported about it few times to no resolution.
Trying to answer one more question, just bumped into two new problems:
XQuery code even without CDATA section blanks out the entire answer.
I made a screen shot of the solution in SSMS and tried to put inside the answer as an image. And discovered that it is impossible to do that. The image is stretched too much down and it is impossible to submit it. It is stuck on the "Preview and resize" step.
Here is the link: replacing-every-other-occurrence-of-string.html