SSIS XML Parser Error
Hi,
I Have a problem when i am trying to export "XML data with UTF-8" to the XML data type column for a table in the database from a Excel File using a SSIS Package.This is the Error : "XML parsing: line 1, character 38, unable to switch the encoding" .
I got a solution that, we need to change the UTF-8 to UTF-16 and the XML data got inserted into the database properly.
Then, we try to insert the same "XML data with UTF-16" into the database using a simpe insert query then it throws the error :"
XML parsing: line 1, character 39, unable to switch the encoding
". But when i try to insert the same "XML data with UTF-8".
Why is this happening and is there any way we can insert "XML data with UTF-8" into the XML data type column in the database via SSIS package. I don't want to change the encoding from UTF-8 to UTF-16. Please helpMAGESH
August 1st, 2012 9:44am
Hi Mageshwaran Ramanathan,
I suggest you adding N in front of your @xml value, please see example as below:
http://weblogs.sqlteam.com/peterl/archive/2010/07/06/More-on-XML-and-encoding.aspx
Thanks,
Eileen
Free Windows Admin Tool Kit Click here and download it now
August 3rd, 2012 5:08am