writing this:
\[code\]$likes = $xpath->query('//span[@class="LikesCount"]');\[/code\]this is waht I get:
\[code\]155 like\[/code\]I would like to write the query so that number_before_like > 5\[code\]$likes = $xpath->query('((int)substring-before(//span[@class="LikesCount"], " ")) > 5');\[/code\]Follows the markup:\[code\]<div class="pin">[...]<a href="http://stackoverflow.com/pin/56787645270909880/" class="PinImage ImgLink"> <img src="http://media-cache-ec3.pinterest.com/upload/56787645270909880_d7AaHYHA_b.jpg" alt="Krizia" data-componenttype="MODAL_PIN" class="PinImageImg" style="height: 288px;"></a><p class="stats colorless"> <span class="LikesCount"> 2 likes </span> <span class="RepinsCount"> 6 repins </span></p>[...]</div>\[/code\]
\[code\]$likes = $xpath->query('//span[@class="LikesCount"]');\[/code\]this is waht I get:
\[code\]155 like\[/code\]I would like to write the query so that number_before_like > 5\[code\]$likes = $xpath->query('((int)substring-before(//span[@class="LikesCount"], " ")) > 5');\[/code\]Follows the markup:\[code\]<div class="pin">[...]<a href="http://stackoverflow.com/pin/56787645270909880/" class="PinImage ImgLink"> <img src="http://media-cache-ec3.pinterest.com/upload/56787645270909880_d7AaHYHA_b.jpg" alt="Krizia" data-componenttype="MODAL_PIN" class="PinImageImg" style="height: 288px;"></a><p class="stats colorless"> <span class="LikesCount"> 2 likes </span> <span class="RepinsCount"> 6 repins </span></p>[...]</div>\[/code\]