OK I am working on a SSIS package and am using a script task. I have to get remote xmldocuments from a server. Sounds simple enough. In C# it was easy but for some reason vb.net will not let me do this:I can do a httpwebrequest and get the xml string into a variable strResponseBut the following will not work. The XmlDocument doesn't exists in the script task the vb code. On a side note I am importing Imports System.Xml in case anyone asks.Dim doc As New XmlDocumentdoc.LoadXml(strResponse)
Could anyone tell me how I would parse the xml elements using a script task?here is the full code I am working with but all of the xml stuff has that blue squggly line underneathit. Private Function ParseXmlIntoList(ByVal strResponse As String, ByVal l As List(Of StockInfo)) As List(Of StockInfo) Dim doc As New XmlDocument Try doc.LoadXml(strResponse) Catch isError = True Return l End Try Dim root As XmlElement = doc.DocumentElement Dim list As XmlNodeList = root.SelectNodes("/StockData/Stock") Dim x As Integer = 0 Dim n As XmlNode For Each n In list If l((x + intStartCount)).Symbol = getXMLElement(n, "Symbol") Then l((x + intStartCount)).Price = Convert.ToDecimal(getXMLElement(n, "Last")) l((x + intStartCount)).CompanyName = getXMLElement(n, "Name") x += 1 Else isError = True Return l End If Next n intStartCount = intStartCount + 25 Return l End Function
Any help would be greatly appreciated.Thanks,JBelthoff• Hosts Station is a Professional Asp Hosting Provider• Position SEO can provide your company with SEO Services at an affordable price› As far as myself... I do this for fun!