从XML文件中检索节点值,然后通过SSIS将数据存储到数据库中 [英] Retrieving node values from XML file and storing the data into database via SSIS

查看:78
本文介绍了从XML文件中检索节点值,然后通过SSIS将数据存储到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用Web服务任务在XML File中给出以下结果,

I have used a web service task to give the following result in XML File as follows,

<?xml version="1.0" encoding="utf-16"?>
<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name xmlns="http://Iycon.com/WebService">Reshma</Name>
  <BirthDate xmlns="http://Iycon.com/WebService">1988-09-23T00:00:00</BirthDate>
</Data>

,现在我打算在数据库中插入两个值,最初我使用单个值,然后使用执行SQL任务从Web服务任务将该值插入到数据库中,但是具有多个值,我面临着问题,无法在进行了一些研究以了解Foreach循环容器但未能正确使用它之后,使用XML任务从两个节点中检索值,以便我可以遍历这两个节点并将该数据插入数据库中, 任何帮助将不胜感激,

, now I am intended to insert two values in database, initially I worked with single value and I inserted that value into database from web service task using execute SQL task, but with this multiple values ,I am facing problem, Unable to use XML task to retrieve the values from two node, after some study got to know about Foreach loop container but failing to use it properly so that I can traverse through both of them node and insert that data into database, Any help will be greatly appreciated,

推荐答案

在foreach循环容器上有一篇不错的文章,请看一下

there is a good article on foreach loop container hv a look at it

https://www .simple-talk.com/sql/ssis/ssis-basics-introducing-foreach-loop-container/

当您说两个值是标记之间的文本时,该标记之间用分隔符或子节点分隔

when you say two value is it text between tag separated by some delimiter or child node in it

任何例子都可以帮助

Ashish Shevale

Ashish Shevale

这篇关于从XML文件中检索节点值,然后通过SSIS将数据存储到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆