php - Xpath getting multiple p tags in one nodeValue -


i'd retrieve of p tags within div class="post" in 1 nodevalue. here html:

<div class="blogentry expecting featured featured-post-today%e2%80%99s-top-story first"> <h2><a href="/2013/09/03/rachel-zoe-pregnant-expecting-second-child/" rel="bookmark" title="permanent link rachel zoe expecting second&nbsp;child">rachel zoe expecting second&nbsp;child</a></h2> <div class="post">     <p>sometext</p>     <p>someothertext</p> </div> <div class="blogentry expecting featured featured-post-today%e2%80%99s-top-story first"> <h2><a href="someurl" rel="bookmark" title="permanent link rachel zoe expecting second&nbsp;child">sometitle</a></h2> <div class="post">     <p>sometext</p>     <p>someothertext</p> </div> </div> 

here xpath:

$finder->query('//div[contains(@class,"blogentry")]//div[@class="post"]//p'); 

it should :

$finder->query('//div[contains(@class,"blogentry")]/div[@class="post"]/p'); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -