After re-reading your post a couple times I think understand what you are after, although my previous questions still apply. The once loop bit can be done like this:
VB Code:
Dim xdoc As New XmlDocument
xdoc.Load("..\data.xml")
For Each nod As XmlNode In xdoc.SelectNodes("//*")
Select Case nod.Name
Case "host"
MsgBox(nod.Attributes("ip").Value, , "host")
Case "themes"
MsgBox(nod.Attributes("value").Value, , "themes")
Case "locationupdate"
MsgBox(nod.Attributes("path").Value, , "locationupdate")
End Select
Next
Although then you have to loop through every node even though you don't use all of them. Now in your sample there isn't much you don't use so its no biggie but if the file was larger then this would be wasteful.
I would suggest you do it like the following:
VB Code:
Dim xdoc As New XmlDocument
xdoc.Load("..\data.xml")
For Each nod As XmlNode In xdoc.SelectNodes("//servers/host")
MsgBox(nod.Attributes("ip").Value, , "host")
Next
MsgBox(xdoc.SelectSingleNode("//themes/@value").Value, , "themes")
MsgBox(xdoc.SelectSingleNode("//locationupdate/@path").Value, , "locationupdate")
Also if you only need the ip and not the value of the host node then you can use this in the loop instead:
VB Code:
For Each nod As XmlNode In xdoc.SelectNodes("//servers/host/@ip")
MsgBox(nod.Value, , "host")
Next