Hello,
We use a bulk import of an XML file to SQL SERVER 2005 :
DECLARE @xmlFileName VARCHAR(300)
SELECT @xmlFileName = 'C:\myfile.xml'
EXEC('
INSERT INTO _XmlImportTest(xmlFileName
, xml_data)
SELECT ''' + @xmlFileName + ''', xmlData
FROM
(
SELECT *
FROM OPENROWSET (BULK ''' + @xmlFileName + ''' , SINGLE_BLOB) AS XMLDATA
) AS FileImport (XMLDATA)
')
It works well except when we have accents (in the data, not in the tag name of course) the imports stops with the following error :
Analyse XML : ligne 4, caractère 20, caractère XML non conforme
which disappear as soon as we take out the accentuated character.
So the question is how can we bulk import an XML file with accent datas ?