I'm trying to import all at once the values from a class split in 3 subclasses.
The class was subdivided into 3 'subclasses' substrings values appended "--low
", "--medium
", "--high
" like so:
<td class="calendar__cell calendar__impact impact calendar__impact calendar__impact--low">
<td class="calendar__cell calendar__impact impact calendar__impact calendar__impact--medium">
<td class="calendar__cell calendar__impact impact calendar__impact calendar__impact--high">
I tried the working solution for each separated class below:
My Xpath query for the 1st class which returns all the 'low' tagged titles successfully:
//td[@class='calendar__cell calendar__impact impact calendar__impact calendar__impact--low']//span/@title
My google sheets formula:
=IMPORTXML("https://www.forexfactory.com/calendar?month=jul.2023",a1)
What I want to do is get all elements from those 3 classes all at once.
I though of using a regular expression all operator "*
" but I'm not sure how to formulate it.
I thought of this formula but it's not there yet:
//td[@class='calendar__cell calendar__impact impact calendar__impact calendar__impact--&"*"']//span/@title
I found this working workaround with contains:
//tbody//span/@title[contains(.,'Impact')]
But I'm interested in knowing how a regular expression all operator "*
" way with the 3 classes queried at once would work.
I previously tested those other queries inspired by @Tanaike answer
//table//span/@title
//tbody//span/@title
//tr//span/@title
//tbody//img/@src