For setting the content use the content=
method.
doc = Nokogiri::XML(open("http://www.pcinpact.com/rss/news.xml"))
doc.xpath('//item').each do |i|
pp i.xpath('title').first.content = "My new title"
end
For more on how to manipulate a document in Nokogiri, check out "Modifying an HTML / XML Document".