samedi 9 mai 2015

How to write Xpath

This is the HTML in tabular format.

<tr><td style="width: 150px;">Development Name:</td><td><b>Bellewoods</b></td></tr>

<tr><td style="width: 150px;">Property Type:</td><td><b>Executive Condominium</b></td></tr>

<tr><td style="width: 150px;">Developer:</td><td><b>Qingjian Realty (Woodlands) Pte Ltd</b></td></tr>
                                                                                        <tr><td style="width: 150px;">Tenure:</td><td><b>99-year Leasehold</b></td></tr>
                                                                                            <tr><td style="width: 150px;"># of Floors:</td><td><b>30</b></td></tr>

<tr><td style="width: 150px;"># of Units:</td><td><b>561</b></td></tr>

I want to extract:-

Development Name Property Type Developer Tenure Floors Units

I am using this xpath, but its not working . Please help

'//tr//td[@style="width: 150px;" and text()="Development Name:"]//td//b'

Aucun commentaire:

Enregistrer un commentaire