Reputation: 33
i have to extract useful information from web
i can i do using c#
example
title: abc
i have get only "abc"
Upvotes: 1
Views: 691
Reputation: 1
Using DOM parser you can extract required elements. If you pre-aware of the block id or if you able to prepare it then the extraction is quite simple.
Upvotes: 0
Reputation: 1771
As, @Oded♦ recommended, Html Agility Pack will be useful.
This is example of html agility pack.
HtmlDocument doc = new HtmlDocument();
doc.Load("file.htm");
foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a[@href"])
{
HtmlAttribute att = link["href"];
att.Value = FixLink(att);
}
doc.Save("file.htm");
Upvotes: 1
Reputation: 498942
If you need to extract text from a website, you need to use an HTML parser such as the HTML Agility Pack.
Upvotes: 0