0

There is already an excellent answer to this question posted Previous Answer, and it almost works as advertised, but I have one problem. In the example the author creates a "For Each File Enumerator" and a loop variable to hold the XML file name. The value of this variable is left as an empty string.

I find that I must put a valid initial value in that variable. If I do not, I get this error: Validation Error. Import XML Serialization File: The property "XMLDataVariable" on the Read XML Serialization File was empty"

If I put in a valid initial value, the package executes correctly. This is superfluous, but if I then put a new set of XML files in the folder to be imported without changing the initial value I get this error when I execute the package: Package Validation Error. The file text specifying my particular file here was not found. Please verify the path and try again.

I suspect I have something set up incorrectly, but I'm new to SSIS and I'm not sure where to look. Thanks for any help.

Community
  • 1
  • 1
DavidG
  • 65
  • 1
  • 9

3 Answers3

0

I followed the instructions from the previous answer in Visual Studio 2008 and I was not able to reproduce the error your are receiving. Here are a few things to try:

  • Open the XML Source component properties and make sure your XMLDataVariable is pointing to your User::FilePath variable:

    XML Source properties

  • If you set the initial value of your User::FilePath variable to blank, the XML Source component will fail if you execute it directly (by right clicking on the data flow it is in and choosing "Execute Task"). If you instead execute your whole package - and everything is configured correctly - then you should not get the error.

  • You can try setting the "ValidateExternalMetadata" property of your XML Source component to False. In my case I don't need to do this, but if your package is configured slightly differently it might help.

Community
  • 1
  • 1
Bert Wagner
  • 851
  • 1
  • 11
  • 23
  • The third answer solved my problem. I need to learn to start looking around the Visual Studio environment for the obvious! Thank you. – DavidG Apr 03 '15 at 18:30
0

Set DelayValidation property of XML source to True, that should resolve your issue

SwapnilK
  • 76
  • 5
  • The idea in this answer is correct. The correct field for the XML Source task is "ValidateExternalMetadata". It certainly would have led me to the solution if not for Bert's answer. Thanks. – DavidG Apr 03 '15 at 18:34
0

I was able to resolve this issue for my XML file once I set the DelayValidation property from False to True.