nacho nacho

nacho nacho

  • NA
  • 2
  • 546

Help with a Windows Form Application parser

Oct 5 2017 11:02 AM
Hello everyone, first post here, so if you see errors on posting/explaining, make me know to fix it...
What i want to make it's form that parse an INTRANET webpage and bring me data back to show it on labels....
I have tried with HtlmAgilityPack, but it doesn't parse anything of that web, cause its intranet, and i'm doing something that don't fit well. It returns me an error like "specific node can't be null"...
Something like this:
 
  1. public class Program  
  2. {  
  3. public static void Main()  
  4. {  
  5. var html = @"http://html-agility-pack.net/"; HERE GOES MY INTRANET URL, AND NOT THIS.  
  6.   
  7. HtmlWeb web = new HtmlWeb();  
  8.   
  9. var htmlDoc = web.Load(html);  
  10.   
  11. var node = htmlDoc.DocumentNode.SelectSingleNode("//td/span");  
  12.   
  13. }  
  14. }  
Something like this:
 
 
When click in the button, bring me the especific data.

Answers (1)