PDA

View Full Version : Import xml web page



character
07-03-2012, 01:14 PM
Dear all,

I am trying to build a vba code in order to import the following xml (http://bnr.ro/nbrfxrates.xml)page,
which I should update daily.

How can I do it using the VBA - xml reference?

10x,
character

Kenneth Hobs
07-03-2012, 02:17 PM
See:
http://www.vbaexpress.com/forum/showthread.php?t=41961
http://www.vbaexpress.com/forum/showthread.php?t=42251

'Oorang, http://www.vbaexpress.com/forum/showthread.php?t=26727
'Micosoft web services, http://www.microsoft.com/downloads/en/details.aspx?familyid=fa36018a-e1cf-48a3-9b35-169d819ecf18&displaylang=en
'URL, http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl

Sub Test()
'Dim clsWthr As clsws_Weather
Dim xmlResult() As MSXML2.IXMLDOMSelection
Dim xmlNode As MSXML2.IXMLDOMNode
Dim strXML As String
Dim i As Long
'Set clsWthr = New clsws_Weather
'xmlResult = clsWthr.wsm_GetCityForecastByZIP("27603").ForecastResult
For i = 0 To UBound(xmlResult)
For Each xmlNode In xmlResult(i)
Debug.Print xmlNode.XML
Next
Debug.Print
Next
End Sub

character
07-04-2012, 12:48 AM
Hello,

10x for your answer, I have tried to adapt the code from the 2nd link you have provided, but i get stuck when trying to reach the inside "Rate" tag.

is there a way to directly go the tag?

10x