Question How to move to selected nodes

elite87

Member
Joined
Aug 13, 2009
Messages
8
Programming Experience
1-3
This is my code..
VB.NET:
Dim sURL As String

        sURL = "http://podcast.amp-media.net/era/feed.xml"
        Dim wreq As HttpWebRequest = HttpWebRequest.Create(sURL)
        Dim wp As New WebProxy("172.xx.xx.xx:xxxx", True)
    

        Dim wc As New WebClient()
        wc.Proxy = wp

        Dim ms As New MemoryStream(wc.DownloadData(sURL))

        Dim xtr As New XmlTextReader(ms)
        Dim i As Integer = 0
        Do While xtr.Read

            If xtr.NodeType = XmlNodeType.Element Then

                If xtr.Name = "title" Then
                    xtr.Read()
                    If i = "1" Then
                        song1.Text = xtr.Value.ToString()
                    ElseIf i = "2" Then
                        song2.Text = xtr.Value.ToString()
                    ElseIf 1 = "3" Then
                        song3.Text = xtr.Value.ToString()
                    ElseIf i = "4" Then
                        song4.Text = xtr.Value.ToString()
                    ElseIf i = "5" Then
                        song5.Text = xtr.Value.ToString()
                    End If
                End If
                i = i + 1
            End If


        Loop

I hv this c# code... where i can navigate to other node... just wonder hw to do that...

can i know hw to do that in my code above.....

VB.NET:
 private void Form1_Load(object sender, EventArgs e)
        {
            XmlDocument doc = new XmlDocument();
            doc.Load("http://podcast.amp-media.net/era/feed.xml");
            XmlElement root = doc.DocumentElement;
            XmlNodeList nodes = root.SelectNodes("//rss/channel/item[position() <= 10]");
           

             foreach (XmlNode node in nodes)
           {
                title = node["title"].InnerText;
                 pubDate = node["pubDate"].InnerText;
              
               this.comboBox1.Items.Add(title.ToString());

             }
        }
 
Back
Top