dbTalk Databases Forums  

SSIS Import XML File w/Integrated DTD

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS Import XML File w/Integrated DTD in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kirk
 
Posts: n/a

Default SSIS Import XML File w/Integrated DTD - 06-22-2006 , 02:25 PM






I have been provided several XML documents with integrated DTDs that
resemble:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Item [
<!ELEMENT ID (#PCDATA)>
<!ELEMENT Description (#PCDATA)>
<!ELEMENT Item (Item*, ID?, Description?)>
]>
<Item>
<Item>
<ID>17</ID>
<Description>This is a description</Description>
</Item>
</Item>

I am trying to import them into a SQL Server database using an SSIS
Package in Integration Services. Once in Visual Studio, I create a
package, I add an XML Source to it, I provide the file name and check
"Use inline schema", I click Columns and receive an error:

TITLE: Microsoft Visual Studio
------------------------------
Error at Data Flow Task [XML Source [1]]: There was an error setting up
the mapping. DTD is prohibited in this XML document.
------------------------------
ADDITIONAL INFORMATION:
Pipeline component has returned HRESULT error code 0xC02090CF from a
method call. (Microsoft.SqlServer.DTSPipelineWrap)

If I attempt to generate the schema using the "Generate XSD" button, I
receive:

TITLE: Microsoft Visual Studio
------------------------------
For security reasons DTD is prohibited in this XML document. To enable
DTD processing set the ProhibitDtd property on XmlReaderSettings to
false and pass the settings into XmlReader.Create method.

Now I know from experience that I need to set the ProhibitDTD option to
false when processing documents in code. I assume the same thing
applies when processing documents using SSIS (well, that and the error
message tells me so).

Does anyone know if there's a way to change the ProhibitDTD setting
from within an SSIS package or am I SOL?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.