XML parsing error: An invalid character was found in text content.

So I was writing a script to pull out some old xml data, and I happened upon this error:

XML parsing error: An invalid character was found in text content.

It probably would have taken me centuries to figure out what character it didn't like, so I tried concatenating the following line to the front of the xml column in the SELECT statement I used to populate the cursor for openxml, and voila, no more error!  I guess bumbles really do bounce.

''

This article is part of the GWB Archives. Original Author: Alex Bransky

New on Geeks with Blogs