Im wondering if there is a better way to do this:

VB Code:
  1. For Each cn As XmlNode In xnl
  2.                 If (cn.Name = "username") Then
  3.                     Console.WriteLine("name: " & cn.Value)
  4.                 End If
  5.             Next cn

The xml looks like

<users>
<user><name>johndoe</name><password>abc</password></user></users>

I can have multiple <user> and is there a quick and nice way to iterate through each user and print its elements? I dont like to use lots of case and if but rather use all the clever methods in the xml name space...

/henrik