Skip to content

Instantly share code, notes, and snippets.

@razan-rai
Created January 9, 2017 06:46
Show Gist options
  • Select an option

  • Save razan-rai/c1897e10bca6fa35f3f50852d2caeeb0 to your computer and use it in GitHub Desktop.

Select an option

Save razan-rai/c1897e10bca6fa35f3f50852d2caeeb0 to your computer and use it in GitHub Desktop.
xpath to get data starts with specific character or string
//edtracting Telephone no and other stuff
<div class="inhalt-links">
<h2>
Deutsche Verkehrswacht
<br>
Verkehrswacht Dortmund e. V.
<br>
</h2>
<h3>
Standnummer:&nbsp;
<span style="font-weight: normal;">4.E08</span>
</h3>
<div class="clear"></div>
<br>
Benediktinerstraße 82
<br>
44287&nbsp;Dortmund
<br>
Deutschland
<br>
<br>
Tel.:+49 231 447687
<br>
Fax:+49 231 447136
<br>
E-Mail:[email protected]
<br>
<a href="http://www.verkehrswacht-dortmund.de" class="url" target="_blank">www.verkehrswacht-dortmund.de</a>
<br>
<div class="social"></div>
<br>
</div>
use:
//div[@class='inhalt-links']/text()[starts-with(normalize-space(), 'Tel.:')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment