HTML Agility Pack SelectSingleNode method not listed on Universal Apps (C#) -


this question has answer here:

i developing simple web scraping app in c# , here code load html code received server htmldocument.

string html = res.content.tostring(); htmldocument htmldoc = new htmldocument(); htmldoc.loadhtml(html); 

whenever try use htmldoc.documentnode.selectsinglenode method getting error:

"html node not contain reference selectsinglenode".

am missing something?

i developing universal app in visual studio 2015. downloaded , installed html agility pack using nuget manager.

universal app doesn't support xpath. can not use selectsinglenode or selectnodes methods. can use linq, like

    doc.documentnode.descendants("a")        .where(a => a.innertext.contains("some text"))        .select(a => a.attributes["href"].value); 

to same nodes


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -