Given a Nokogiri::XML::Node object, how can I remove some of its dom nodes? For example, suppose I have an object whose innerHtml is:
hello world <b>this is in bold face</b> <div>this is inside a div</div> bye bye
How can I remove the <div> element and get a Nokogiri::XML::Node object whose innerHtml is:
hello world <b>this is in bold face</b> bye bye
Find the
<div>and callremoveon it. For example: