    /*
     * call-seq:
     *  replace_entities=(boolean)
     *
     * Should this parser replace entities?  &amp; will get converted to '&' if
     * set to true
     */
    static VALUE set_replace_entities(VALUE self, VALUE value)
    {
      xmlParserCtxtPtr ctxt;
      Data_Get_Struct(self, xmlParserCtxt, ctxt);

      if(Qfalse == value)
        ctxt->replaceEntities = 0;
      else
        ctxt->replaceEntities = 1;

      return value;
    }