Issue
I am trying to retrieve the data point "400.000" using the data point ("Vraagprijs") of the preceding "dt" tag. What I have in mind is "select the first dd/span element following the dt element which includes "Vraagprijs" (For reference see the code snippet below).
Note: I am not able to select my data point using //dd[@class=""]
because the class tag is not unique. Also tried indexing but the results are not robust.
<dl class="object-kenmerken-list">
<dt> Vraagprijs</dt>
<dd class="xxx">
<span class ="xxx"> 400.000</span>
<span class ="xxx"> irrelevant data</span>
</dd>
</dl>
Solution
This xpath should get the wanted value
//dt[.="Vraagprijs"]/following-sibling::dd[1]/span[1]/text()
Answered By - LMC
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.