Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SSIS package : Reading XML data in VB Script

Author  Topic 

mauler05
Starting Member

17 Posts

Posted - 2007-10-15 : 15:28:31
Hi Guys,

I have to read a database column in my VB script which basically contains XML data. My requirement is to read that column and then retrieve couple of nodes within that dataset and then based on those values ....i have to execute a procedure....


Can anyone please let me know how to traverse a XML document in VB Script

Thanks......

tm
Posting Yak Master

160 Posts

Posted - 2007-10-18 : 11:59:03
Hope this helps ..

Dim xmlNode As System.Xml.XmlNode
Dim xmlAttrList As System.Xml.XmlAttributeCollection
xmlNode = CType(Dts.Variables("componentObject").Value, System.Xml.XmlNode)
Dts.Variables("componentValue").Value = xmlNode.InnerText

xmlAttrList = xmlNode.Attributes
Dts.Variables("ReturnName").Value = xmlAttrList.Item(0).Value.ToString()

Go to Top of Page

tm
Posting Yak Master

160 Posts

Posted - 2007-10-18 : 12:03:51
There is another way to retrieve attributes without code ..

Refer to ..

http://sqlug.be/blogs/drivenbysql/archive/2006/07/27/258.aspx

Go to Top of Page
   

- Advertisement -