I want to replace the inner_text in all paragraphs in my XHTML document.
I know I can get all text with Nokogiri like this
doc.xpath("//text()")
But I want only operate on text in paragraphs, how I can select all text in paragraphs without affecting eventually existent anchor texts in links ?
#For example : <p>some text <a href="/">This should not be changed</a> another one</p>