class Nokogiri::XML::Node

def coerce data # :nodoc:

:nodoc:
def coerce data # :nodoc:
  case data
  when XML::NodeSet
    return data
  when XML::DocumentFragment
    return data.children
  when String
    return fragment(data).children
  when Document, XML::Attr
    # unacceptable
  when XML::Node
    return data
  end
  raise ArgumentError, <<-EOERR
es a Node, NodeSet or String argument, and cannot accept a #{data.class}.
robably want to select a node from the Document with at() or search(), or create a new Node via Node.new().)
  EOERR
end