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

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.
Posted

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: http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-prolog-dtd[^].

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:
http://en.wikipedia.org/wiki/XML_Schema_%28W3C%29[^], use links to W3 standards shown in this article.

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

—SA
 
Share this answer
 
Hi
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
thanks
 
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