Retrieving node values from XML file and storing t

2019-08-31 06:27发布

问题:

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