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.

Popular Answer

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




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why