i have the following code to for xpath query...
<div class="buying">
<h1 class="parseasinTitle ">
<span id="btAsinTitle">Top Ten Tips for Growing Your Own Tomatoes (The Basic Art of Italian Cooking) <span style="text-transform: capitalize; font-size: 16px;">[Kindle Edition]</span></span>
</h1>
</div>
i just want to extract
Top Ten Tips for Growing Your Own Tomatoes (The Basic Art of Italian Cooking)
so i am using textContent
with the following xpath query
$xpath_books->query('//span[@id="btAsinTitle"]')
but the result is
Top Ten Tips for Growing Your Own Tomatoes (The Basic Art of Italian Cooking) [Kindle Edition]
i think, i have to exclude <span style="text-transform: capitalize; font-size: 16px;">
, to get my purpose,
how can i do it ?