How do I select XML elements in this situation in VB.net?

dlraid

New Member
So I have: \[code\]<rss version="2.0"> <channel> <title>My channel</title> <item></item> <item></item> <item></item> <item></item> </channel></rss>\[/code\]When I use xmlDocument to parse it, I try to get all the item elements, but if I use\[code\]For Each item As System.Xml.XmlElement In xmlDocument.Item("rss").Item("channel")\[/code\]It would give me 5 instead 4 results, since \[code\]<title>My Channel</title>\[/code\] is considered one of the item under channel. I'm just wondering if there is anyway to loop through only the 4 item elements. Thanks!
 
Back
Top