Retrieving node values from XML file and storing the data into database via SSIS

做~自己de王妃 提交于 2019-12-13 04:15:10

问题


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>

, 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,


回答1:


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

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

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

any example will help

Ashish Shevale



来源:https://stackoverflow.com/questions/18822208/retrieving-node-values-from-xml-file-and-storing-the-data-into-database-via-ssis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!