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
Post a Comment