/*
 * call-seq:
 *  -(node_set)
 *
 *  Difference - returns a new NodeSet that is a copy of this NodeSet, removing
 *  each item that also appears in +node_set+
 */
static VALUE minus(VALUE self, VALUE rb_other)
{
  nokogiriNodeSetTuple *tuple, *other;
  xmlNodeSetPtr new;
  int j ;

  if(!rb_obj_is_kind_of(rb_other, cNokogiriXmlNodeSet))
    rb_raise(rb_eArgError, "node_set must be a Nokogiri::XML::NodeSet");

  Data_Get_Struct(self, nokogiriNodeSetTuple, tuple);
  Data_Get_Struct(rb_other, nokogiriNodeSetTuple, other);

  new = xmlXPathNodeSetMerge(NULL, tuple->node_set);
  for (j = 0 ; j < other->node_set->nodeNr ; ++j) {
    xmlXPathNodeSetDel(new, other->node_set->nodeTab[j]);
  }

  return Nokogiri_wrap_xml_node_set(new, rb_iv_get(self, "@document"));
}