Link to home
Start Free TrialLog in
Avatar of Member_2_5230414
Member_2_5230414

asked on

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

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?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_5230414
Member_2_5230414

ASKER

Thanks I didn't spot that!