Deleting An Element From Nokogiri
Join the DZone community and get the full member experience.
Join For FreeIn this example all img elements are deleted from the Nokogiri HTML document.
doc2.xpath('//img').each {|x| x.remove}
Resources:
- inserting and deleting nokogiri XML nodes and elements - Stack Overflow [stackoverflow.com]
Element
Opinions expressed by DZone contributors are their own.
Comments