The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Xpath - Getting text from div
Hey folks,
I've tested my xpath in google docs and it's working fine however I can't get it to work in Rapidminer. In the Extract Information operator if I use the query "//h:div[2]/h:div/h:ul/h:li[1]/h:div" I get the result below:
I've tested my xpath in google docs and it's working fine however I can't get it to work in Rapidminer. In the Extract Information operator if I use the query "//h:div[2]/h:div/h:ul/h:li[1]/h:div" I get the result below:
<div xmlns="http://www.w3.org/1999/xhtml" class="stats-value">
<svg class="icon">
<use xmlns:xlink="urn:x-prefix:xlink" xlink:href="#trophy" />
</svg>
Text that I want
</div>
However I just want the text "Text that I want" not the surrounding html. So I try "//h:div[2]/h:div/h:ul/h:li[1]/h:div/text()". This doesn't give me an error but it's not returning anything, no text at all.
Any help is much appreciated.
Neil.
However I just want the text "Text that I want" not the surrounding html. So I try "//h:div[2]/h:div/h:ul/h:li[1]/h:div/text()". This doesn't give me an error but it's not returning anything, no text at all.
Any help is much appreciated.
Neil.
Tagged:
0
Best Answer
-
lionelderkrikor RapidMiner Certified Analyst, Member Posts: 1,195 UnicornNeil,
I forgot to mention : The relevant informations are extracted in the attribute "Titleswon_2".
The informations are not visible at first sight.. You must leave the mouse on it :
Regards,
Lionel
5
Answers
In order we can find a solution can you please share :
- your process
- your data (a priori your excel file where your links are stored)
Regards,
Lionel
It seems that your Excel file is broken. I can not open it with Excel and I cannot load the file in RapidMiner...
Can you share directly the links here ?
Regards,
Lionel
Sorry no need to share the links !
I was able to load your excel file and run your process....
Regards,
Lionel
Yes it's strange.
To extract the relevant informations, I proceeded in 2 steps.
But I'm not able to join the 2 resultings example sets (RapidMiner is raising an error).
Anyway, you can take a look at this process, your information ("Text what I want") is in the second resulting example set...
Hope this helps,
Regards,
Lionel