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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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