XPATH to extract data from CarWale.com?
With help from a friend I made a script to extract all specs and features from pages like http://www.carwale.com/mercedesbenz-cars/e-class/e63amg-3049/ , it works but not perfectly. He told me to use XPath //tr[contains (.,"FEATURE NAME")]/td, but one of them is impossible to pick, using //tr[contains (.,"Display")]/td it extract 4 features containing word Display. Is there any way to pick only the one labelled exactly Display? <td>Trip Meter</td><td>Multi-Function Display </td> <td>Heads Up Display (HUD)</td><td>No </td> <td>Display</td><td>LCD Display </td> <td>Display Screen for Rear Passengers</td><td>No </td> I also extracted car color names using XPath //div[#class='colorName'] I want also car color RGB values, or whole style code and remove unneeded code using find/replace, what XPath I need? <div class="colours" style="background-color: #040404; height: 30px; width: 130px; margin: 7px"></div>
Extract 'td' tag containing 'Display' if it's preceding sibling contains 'Display': //tr/td[contains(.,'Display')]/following-sibling::td[contains(.,'Display')] Extract RGB hex string: //div/substring-before(substring-after(#style,'background-color: '),';')
How to capture a number of divs/ tables at once
multiple string() results for an xpath?
XQuery/XPath: Using count() and max() function for return of element with highest count
Double iteration over a nodeset in XSLT-1.0
What is the correct XPath query for 'select onchange'
XPath 2.0: Retrieving nodes by attribute where value is case Insensitive
XPath - abbreviation of position() function
XPath Query in JMeter
xpath expression to select attribute value
DOMDocument xpath query cut off time
How to parse the following html code get all text before “br” tag
XPath selector by class AND index
How to perform set operations in XPath 1.0
extract data from a div that have no class using xpath
Xpath: Select node but not specific child elements
XQuery - How to use eq (=) on a group of values