class Nokogiri::XML::Node

def swap(node_or_tags)

Also see related method +replace+.

Returns self, to support chaining of calls.

Containing markup.
+node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String

Swap this Node for +node_or_tags+
###
def swap(node_or_tags)
  replace(node_or_tags)
  self
end