HTMLAgilityPack: Selectnodes with XPath

c# html-agility-pack xpath

Question

I'm trying to get all the nodes in a webpage. I've re-checked the XPATH string a lot of times but still no result: I have tried using the following code:

    string publicatiom = "WO2007000010";
    string Check_URL = @"http://patentscope.wipo.int/search/en/detail.jsf?docId=" publication + "&tab=PCTDocuments";
    var baseUrl = new Uri(Check_URL);
    HtmlWeb hw = new HtmlWeb();
    HtmlAgilityPack.HtmlDocument doc = hw.Load(baseUrl.ToString());
    string checkstring = "*//[@id='detailMainForm:j_idt1375:0:j_idt1394']";
    HtmlNodeCollection Nodes = doc.DocumentNode.SelectNodes(checkstring);

However, it returns a runtime error.

1
0
8/18/2014 8:44:34 PM

Popular Answer

string checkstring = "//*[@id='detailMainForm:j_idt1375:0:j_idt1394']";

0
12/10/2014 3:47:41 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow