1

I'm use HttpWebResponse in c# for Response my Request And saves Response data(string) in StreamReader It's work ! But i need to Messages box for some text in StreamReader Look this aera :

<tr><td class='left' style='width: 120px'>Country</td><td class='left'><img src='images/flags/us.png' alt='United States flag' title='United States flag'> United States (US)</td></tr>

this is HTML code ! and i want get This from it

United States (US)

--note : every request the : 'images/flags/us.png' And 'United States flag' It's Change to Others !

GeeSuth
  • 50
  • 8
  • 1
    Possible duplicate of [What is the best way to parse html in C#?](http://stackoverflow.com/questions/56107/what-is-the-best-way-to-parse-html-in-c) – Alex K. Oct 22 '15 at 13:26
  • In this post i dont see Secessful answer , and this is us Webbrowser Tool not Stream data ! , Thanks for u – GeeSuth Oct 22 '15 at 13:33
  • XmlDocument and XPaht does not work. The response could not be parsed in a XmlDocument. – Rom Eh Oct 22 '15 at 13:39
  • Ok ! anther Idea ! , Thanks ROM – GeeSuth Oct 22 '15 at 13:40
  • You can use a regex. It could be not so performant but it wiil work. – Rom Eh Oct 22 '15 at 13:41
  • 1
    The answer in the linked question to parse HTML is to use the Html Agility Pack, to which you would feed your response stream, E.g. [Html Agility Pack. Load and scrape webpage](http://stackoverflow.com/questions/10558149/html-agility-pack-load-and-scrape-webpage) – Alex K. Oct 22 '15 at 13:42

1 Answers1

0

Also , Html Agility Pack is the best work ! , I'm uses Regex really is work!

GeeSuth
  • 50
  • 8