Click here to Skip to main content
15,794,275 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I want to read an xml file via SSIS. but when I read it, it shows that error like

Error at Data Flow Task [XML Source [126]]: There was an error setting up the mapping. DTD is prohibited in this XML document.

I've a .dtd file but dont know how to use it instead of .xsd.

Well, read the error message again: it says the opposite to what you want to do. If you want to use DTD file instead of XSD, you want to do something which is not accepted, according to this message. Perhaps you need to learn how to use XSD instead of DTD, which is easier, because XSD provides wider expressive capabilities then document type definition.

Lean about document type definition here:[^].

Please pay attention that the DTD file is not a separate document and usually is not parsed separately from XML file. The "real" XML declaration is DOCTYPE, but it can be defined using one or more external entities.

Learn using XML Schema starting from here:[^], use links to W3 standards shown in this article.

You cannot get more specific answer as your information in your question is very limited.

Share this answer
Thanks for your reply. I've read the file, I just create an .xsd file via VS and moved to the next step.

Now I can see the columns and I can map them and use every thing but only in design mode.

When I run the package I get this error

[XML Source [2944]] Error: The component "XML Source" (2944) was unable to read the XML data. DTD is prohibited in this XML document.

I cant go further without solving this error :(

plz help
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900