Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read xml data into vba

Status
Not open for further replies.

overdraft015

Programmer
Nov 25, 2007
123
GB
i am trying to read some XML data from a website:


and then trying to list each field but i dont seem to be able to do it

this is what i have already (taken from some xml examples) but doesnt seem to work for me. i think it may have something to do with chilnodes but xml is very new to me.

Private Sub Command1_Click()
Dim xmlDoc As DOMDocument
Dim consignment As IXMLDOMNodeList
Dim messages As IXMLDOMNode

Set xmlDoc = New DOMDocument
xmlDoc.Load "
Set consignment = xmlDoc.documentElement.selectNodes("messages")
For Each messages In consignment
Debug.Print "Deliver To: " & messages.selectSingleNode("to").Text
Debug.Print "Name: " & messages.selectSingleNode("POD name").Text
Next

End Sub

It's not what you know. It's who's on Tek-Tip's
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top