Dhanasekaran Vivekanandhan wrote:
> hi all,
> I have the following html fragment
> I want to get the inner html content inside the
> <p> <img></p> tag , not the between the <p> </p> tag.
> for example in the following example i want to get the result as
> "this is fun". I dont want to get the result including "NO FUN".
> how to do with Hpricot
> 
> example  html fragment:
> ----------------------
> 
> <p class=posted>
>  this is fun
>  <img src="" class="dhans"/>
> </p>
> <p class=posted>
>  NO FUN
> </p>

I did not quite get you. You want the text of the first <p> because it
has an image?
Or what is the exact criterion to accept/reject <p>'s?

Peter

__
http://www.rubyrailways.com