从 XML SSIS 中删除 DTD
大家好,我正在努力解决这个问题。我有一个 foreach 循环,它将循环遍历包含 xml 文件的文件夹,我想将其中的数据导入数据库。问题是 xml 文件有一个 dtd,我无法阻止它附加到 xml 文件。所以我需要一些方法来删除 dtd。我搜索过谷歌和各种论坛,但一无所获。只是想知道是否有人有任何想法?
Hi all im struggling with this one. Ive got a foreach loop that will loop over a folder that contains xml files that i want to import there data into a database. The problem is the xml files have a dtd, theres nothing i can do to prevent this from being attached to the xml file. So i need some way of removing the dtd. Ive searched google and various forums and come up blank. Just wondered if anyone has any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想出了一个很好的解决方案,即我在 ssis 中使用脚本任务,打开文件,删除 dtd,然后保存文件!
I came up with a good solution in that im using a script task in my ssis, that opens the file, removes the dtd and then saves the file!!
我会用您喜欢的编程或脚本语言(.NET、Perl 等)寻找解决方案,然后将其合并到包中。例如,使用执行进程任务来调用命令行工具,或使用标准 .NET XML 支持的脚本任务。
I would look for a solution in your preferred programming or scripting language (.NET, Perl, whatever) and then incorporate that into the package. For example, use an Execute Process task to call a command-line tool, or a Script Task that uses the standard .NET XML support.