Here's one I just had to solve. I had an xml string that was being passed to a sproc that used sp_xml_preparedocument to insert the values using OPENXML. Problem was that the sproc was throwing the following error:
'An invalid character was found in text'
The odd thing was that the xml in question was valid in Visual Studio before it passed it to the sproc and did not have any illegal characters. What I found was that by simply changing the input value from varchar(max) to nvarchar(max) sp_xml_preparedocument was able to parse the xml just fine.
For a quick refresher,
read up on nchar and nvarchar in T-SQL.