I have an issue when running a Data Flow task which extracts data from an XML Source.
I have set up the XML Source to use a variable (User::SourceFile)) as the source, and an XSD, modified slightly from the autogenerated version.
I have no issues executing the Data Flow task by itself, but I get the same error every time I try to execute the Foreach Loop Container that the Data Flow task resides in. The Foreach Loop is set to scan all the XML files in a folder, setting the User::SourceFile variable with each iteration. There is also a cleanup task in the container to move the processed file to an Archive location.
I get the same error messages, no matter what file is read:
**[XML Source [6]] Error: The XML Source was unable to process the XML data. The 'RESPONSE' start tag on line 515181 position 4 does not match the end tag of 'RES'. Line 515184, position 5.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on XML Source returned error code 0xC02092AF. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.**
I don't believe there is an issue with the source file, as the first error would indicate, as the Data Flow runs fine when executed by itself. This error only occurs when trying to execute the Foreach Loop container.