Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Yabanize

2351 posts

Uber Geek
+1 received by user: 583


#181060 30-Sep-2015 21:58
Send private message

Can anyone please tell me how to convert the following Xpath to Linq I have tried looking at other answers and am just confusing myself, I had the Xpath working in a Windows Console app, but then converted it to a Windows Phone app and all hell broke lose. Im trying to get this done in the next 2 hours (for an assignment)

 

HtmlNode myNode = doc.DocumentNode.Sing("//div[@id='mc-account-index']//table//tr[2]//td[2]//strong");

 

  If you want to see the HTML file its being sourced from its Here I would like the output to be "$4.95"

Thanks!!

Create new topic
geocom
597 posts

Ultimate Geek
+1 received by user: 143

Subscriber

  #1397666 30-Sep-2015 22:59
Send private message

I don't deal with HtmlAgilityPack but are you sure doc.DocumentNode.Sing Is valid?

 

I can find lots of articles that use doc.DocumentNode.SelectSingleNode to select the node.

Otherwise can you tell us what it does give you and what the errors are.




Geoff E


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.