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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -