    /*
     *  call-seq:
     *    unlink
     *
     * Unlink this NodeSet and all Node objects it contains from their current context.
     */
    static VALUE unlink_nodeset(VALUE self)
    {
      xmlNodeSetPtr node_set;
      int j, nodeNr ;

      Data_Get_Struct(self, xmlNodeSet, node_set);
      nodeNr = node_set->nodeNr ;
      for (j = 0 ; j < nodeNr ; j++) {
        VALUE node ;
        xmlNodePtr node_ptr;
        node = Nokogiri_wrap_xml_node(Qnil, node_set->nodeTab[j]);
        rb_funcall(node, rb_intern("unlink"), 0); /* modifies the C struct out from under the object */
        Data_Get_Struct(node, xmlNode, node_ptr);
        node_set->nodeTab[j] = node_ptr ;
      }
      return self ;
    }