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
672 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 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