SQL sp_xml_preparedocument - XML parsing error: An Invalid character was found in text content
I am sending an xml document to Sql Server as text and this error occurs only when sp_xml_preparedocument is called with
special characters(öß) in the xml.
I am using OPENXML to extract the data from the elements to store in tables, however SQL Servers
sp_xml_preparedocument cause an exception with special characters.
As a temp fix,
I solved this issue by changeing the sql stored procedure parameter that accepts the XML document to ntext type and changed the table columns type to nvarchar. This allowed the special characters to be inserted without errors into SQL
Do i have any other solution to stayback with my text and varchar datatype
rather than using ntext and nvarchar?
http://www.selvaonline.com - Live a Happy & Balanced Life
View Complete Post