Solved

HTMLAgilitypack - error System.Xml.XPath.XPathException: './/div[contains(@class, 'match event-information ui-inplay ui-has-score']' has an invalid token.

Posted on 2014-02-15
2
605 Views
Last Modified: 2014-02-19
Hi ALL,

I am trying to pull all the values within the 2 separate divs.

One will display live game and displays coming up games.

Below are the div with there classes:

LIVE:
<div class="match event-information ui-inplay ui-has-score ui-event ui-27144806 ui-market ui-924_8120118 ui-inplay ui-no-status-message" data-eventId="27144806" data-marketId="924.8120118">

Open in new window


Coming up:
<div class="match event-information ui-has-score ui-event ui-27144699 ui-market ui-924_8109014 ui-no-status-message" data-eventId="27144699" data-marketId="924.8109014">

Open in new window


the only difference is those games that are live have the text have ui-inplay so due to this i am trying to use the below to pull the different divs-

.//div[contains(@class, 'match event-information ui-inplay ui-has-score']" - to find the live scores and
.//div[contains(@class, 'match event-information ui-has-score']" - to find upand coming scores



issue is i get the errorSystem.Xml.XPath.XPathException: './/div[contains(@class, 'match event-information ui-inplay ui-has-score']' has an invalid token.

i presume its due to the - how can a fix this?
0
Comment
Question by:runnerjp2005
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 39863643
You are missing a right parenthesis for the "contains" method.
0
 

Author Closing Comment

by:runnerjp2005
ID: 39869745
Thanks I didn't spot that!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
crm development 2 36
Is IHttpActionResult a promise pattern? 2 33
XML & .net 5 18
Open a word document 23 0
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now