WebClient client = new WebClient();
client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
client.OpenReadAsync(new Uri("http://www.todayonline.com/RSS/Todayonline", UriKind.Absolute));
void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
XmlReader reader = XmlReader.Create(e.Result);
reader.ReadToFollowing("title");
// assume there is a textbox named "textBox1"
textBox1.Text = reader.ReadElementContentAsString() + "\n\n";
}
client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
client.OpenReadAsync(new Uri("http://www.todayonline.com/RSS/Todayonline", UriKind.Absolute));
void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
XmlReader reader = XmlReader.Create(e.Result);
reader.ReadToFollowing("title");
// assume there is a textbox named "textBox1"
textBox1.Text = reader.ReadElementContentAsString() + "\n\n";
}
1 comment:
Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
Post a Comment