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
621 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

25 Experts available now in Live!

Get 1:1 Help Now