I am developing a SSIS package to add data from an XML file to an existing SQL Server table. I have c开发者_JAVA技巧ompleted several similar projects, but on this XML file I am getting the error from the Data Flow tab between the XML Task and Data Flow Task:
Error: 0xC002F304 at XML Task, XML Task: An error occurred with the following error message:
"'', hexadecimal value 0x15, is an invalid character. Line 28, position 54.".
Error: 0xC002928F at XML Task, XML Task: Property "New Source" has no source Xml text;
Xml Text is either invalid, null or empty string.
Task failed: XML Task
Warning: 0x80019002 at zSTU_TS_Element: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "zStu_TS_Element.dtsx" finished: Failure.
Do you know how I can fix this?
This is the line it is referring to from my XML file:
<z:row c0='12' c1='80' c2='2006-04-17' c3='539' c4='1M2083N4N5N6N75800901110 11 '/>
It's not wrong. The character ‘U+0015 Negative Acknowledge’ (0x15, ASCII 21) is a control code which cannot be put in an XML 1.0 file. The XML file you have is not well-formed (and hence not really an XML file); try to open it in any other XML reader (eg. IE) and you should get the same error.
You'll need to hack that character out of the file using a text editor, and have a look at whatever broken source produced it.
(Unfortunately we can't see that character posted here, as it's a typically-invisible control code which StackOverflow filters out anyway. A good text editor should, however, be able to display some sort of marker that it's there. The column number in the error suggests it is at the start of the c4
attribute value, though this isn't necessarily reliable.)
精彩评论