RssUrl = textbox1.Text
treeviewMENU.Nodes.Clear()
Dim doc As New XmlDocument()
doc.Load(RssUrl)
Dim navigator As XPathNavigator = doc.CreateNavigator()
Dim nodes As XPathNodeIterator = navigator.Select("/rss/channel/item/title")
While nodes.MoveNext
Dim node As XPathNavigator = nodes.Current
Dim tmp As String = node.Value.Trim()
tmp = tmp.Replace(ControlChars.CrLf, "")
tmp = tmp.Replace(ControlChars.Lf, "")
tmp = tmp.Replace(ControlChars.Cr, "")
tmp = tmp.Replace(ControlChars.FormFeed, "")
tmp = tmp.Replace(ControlChars.NewLine, "")
treeviewMENU.Nodes.Add(tmp)
End While
Dim position As Integer = 0
Dim nodesLink As XPathNodeIterator = navigator.Select("/rss/channel/item/link")
While nodesLink.MoveNext
Dim node As XPathNavigator = nodesLink.Current
Dim tmp As String = node.Value.Trim()
tmp = tmp.Replace(ControlChars.CrLf, "")
tmp = tmp.Replace(ControlChars.Lf, "")
tmp = tmp.Replace(ControlChars.Cr, "")
tmp = tmp.Replace(ControlChars.FormFeed, "")
tmp = tmp.Replace(ControlChars.NewLine, "")
treeviewMENU.Nodes(position).Tag = tmp
position += 1
End While
end sub
Private Sub tvwRss_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles treeviewMENU.AfterSelect
webBrowser1.Navigate(treeviewMENU.SelectedNode.tag)
End Sub