class Openwsman::XmlNode

Public Instance Methods

add(*args) click to toggle source
SWIGINTERN VALUE _wrap_XmlNode_add(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p___WsXmlNode, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p___WsXmlNode, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_XmlNode_add__SWIG_1(nargs, args, self);
      }
    }
  }
  if ((argc >= 3) && (argc <= 4)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p___WsXmlNode, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          if (argc <= 3) {
            return _wrap_XmlNode_add__SWIG_0(nargs, args, self);
          }
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_XmlNode_add__SWIG_0(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "add", 
    "    WsXmlNodeH add(char const *ns, char const *name, char const *text)\n"
    "    WsXmlNodeH add(WsXmlNodeH node)\n");
  
  return Qnil;
}
add_before(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_add_before(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","add_before", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","add_before", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","add_before", 3, argv[1] ));
  }
  arg3 = (char *)(buf3);
  if (argc > 2) {
    res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","add_before", 4, argv[2] ));
    }
    arg4 = (char *)(buf4);
  }
  result = (WsXmlNodeH)__WsXmlNode_add_before(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return Qnil;
}
attr(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_attr(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  VALUE arg2 = (VALUE) Qnil ;
  VALUE arg3 = (VALUE) Qnil ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlAttrH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","attr", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  if (argc > 0) {
    arg2 = argv[0];
  }
  if (argc > 1) {
    arg3 = argv[1];
  }
  result = (WsXmlAttrH)__WsXmlNode_attr(arg1,arg2,arg3);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlAttr, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
attr_add(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_attr_add(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  WsXmlAttrH result;
  VALUE vresult = Qnil;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","attr_add", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","attr_add", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","attr_add", 3, argv[1] ));
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","attr_add", 4, argv[2] ));
  }
  arg4 = (char *)(buf4);
  result = (WsXmlAttrH)__WsXmlNode_attr_add(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlAttr, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return Qnil;
}
attr_count(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_attr_count(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","attr_count", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (int)__WsXmlNode_attr_count(arg1);
  vresult = SWIG_From_int((int)(result));
  return vresult;
fail:
  return Qnil;
}
attr_find(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_attr_find(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  WsXmlAttrH result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","attr_find", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","attr_find", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","attr_find", 3, argv[1] ));
  }
  arg3 = (char *)(buf3);
  result = (WsXmlAttrH)__WsXmlNode_attr_find(arg1,(char const *)arg2,(char const *)arg3);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlAttr, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return Qnil;
}
child(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_child(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","child", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (WsXmlNodeH)__WsXmlNode_child(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
doc(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_doc(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlDocH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","doc", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (WsXmlDocH)__WsXmlNode_doc(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
dump_file(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_dump_file(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","dump_file", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  {
    struct rb_io *fptr;
    
    
    
    Check_Type(argv[0], T_FILE);
    GetOpenFile(argv[0], fptr);
    /*rb_io_check_writable(fptr);*/
    
    arg2 = rb_io_stdio_file(fptr);
    
    
    
  }
  __WsXmlNode_dump_file(arg1,arg2);
  return Qnil;
fail:
  return Qnil;
}
each(name=nil, ns=nil) click to toggle source

Iterate thru each element in the XmlNode. A block must be provided.

SWIGINTERN VALUE
_wrap_XmlNode_each(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) NULL ;
  char *arg3 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  
  if ((argc < 0) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","each", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  if (argc > 0) {
    res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","each", 2, argv[0] ));
    }
    arg2 = (char *)(buf2);
  }
  if (argc > 1) {
    res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","each", 3, argv[1] ));
    }
    arg3 = (char *)(buf3);
  }
  __WsXmlNode_each(arg1,(char const *)arg2,(char const *)arg3);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return Qnil;
}
each_attr(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_each_attr(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","each_attr", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  __WsXmlNode_each_attr(arg1);
  return Qnil;
fail:
  return Qnil;
}
epr(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_epr(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  epr_t *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 3) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","epr", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","epr", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","epr", 3, argv[1] ));
  }
  arg3 = (char *)(buf3);
  ecode4 = SWIG_AsVal_int(argv[2], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","epr", 4, argv[2] ));
  } 
  arg4 = (int)(val4);
  result = (epr_t *)__WsXmlNode_epr(arg1,(char const *)arg2,(char const *)arg3,arg4);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_epr_t, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return Qnil;
}
equal(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_equal(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  WsXmlNodeH arg2 = (WsXmlNodeH) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","equal", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "WsXmlNodeH","equal", 2, argv[0] )); 
  }
  arg2 = (WsXmlNodeH)(argp2);
  result = (int)__WsXmlNode_equal(arg1,arg2);
  vresult = (result != 0) ? Qtrue : Qfalse;
  return vresult;
fail:
  return Qnil;
}
find(ns, name, recursive=1) → XmlNode click to toggle source

Find an element in the class.

SWIGINTERN VALUE
_wrap_XmlNode_find(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 = (int) 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 3)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","find", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","find", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","find", 3, argv[1] ));
  }
  arg3 = (char *)(buf3);
  if (argc > 2) {
    ecode4 = SWIG_AsVal_int(argv[2], &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","find", 4, argv[2] ));
    } 
    arg4 = (int)(val4);
  }
  result = (WsXmlNodeH)__WsXmlNode_find(arg1,(char const *)arg2,(char const *)arg3,arg4);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return Qnil;
}
get(*args) click to toggle source
SWIGINTERN VALUE _wrap_XmlNode_get(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if ((argc >= 2) && (argc <= 4)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p___WsXmlNode, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_XmlNode_get__SWIG_0(nargs, args, self);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          if (argc <= 3) {
            return _wrap_XmlNode_get__SWIG_0(nargs, args, self);
          }
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_XmlNode_get__SWIG_0(nargs, args, self);
          }
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p___WsXmlNode, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        if (argc <= 2) {
          return _wrap_XmlNode_get__SWIG_1(nargs, args, self);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_XmlNode_get__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "get", 
    "    WsXmlNodeH get(int i, char const *name, char const *ns)\n"
    "    WsXmlNodeH get(char const *name, char const *ns)\n");
  
  return Qnil;
}
lang=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_lange___(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","set_lang", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","set_lang", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  __WsXmlNode_set_lang(arg1,(char const *)arg2);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}
name(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_name(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","name", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (char *)__WsXmlNode_name(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}
name=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_namee___(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","set_name", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","set_name", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  __WsXmlNode_set_name(arg1,(char const *)arg2);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}
next(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_next(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","next", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  if (argc > 0) {
    ecode2 = SWIG_AsVal_int(argv[0], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","next", 2, argv[0] ));
    } 
    arg2 = (int)(val2);
  }
  result = (WsXmlNodeH)__WsXmlNode_next(arg1,arg2);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
ns(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_ns(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","ns", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (char *)__WsXmlNode_ns(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}
ns=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_nse___(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","set_ns", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","set_ns", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  __WsXmlNode_set_ns(arg1,(char const *)arg2);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}
parent(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_parent(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","parent", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (WsXmlNodeH)__WsXmlNode_parent(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
prefix(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_prefix(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","prefix", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (char *)__WsXmlNode_prefix(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}
size(name=nil, ns=nil) → int click to toggle source

Size or Length of the XmlNode.

SWIGINTERN VALUE
_wrap_XmlNode_size(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) NULL ;
  char *arg3 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","size", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  if (argc > 0) {
    res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","size", 2, argv[0] ));
    }
    arg2 = (char *)(buf2);
  }
  if (argc > 1) {
    res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","size", 3, argv[1] ));
    }
    arg3 = (char *)(buf3);
  }
  result = (int)__WsXmlNode_size(arg1,(char const *)arg2,(char const *)arg3);
  vresult = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return Qnil;
}
string(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_string(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","string", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (char *)__WsXmlNode_string(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  free(result);
  return vresult;
fail:
  return Qnil;
}
text(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_text(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","text", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  result = (char *)__WsXmlNode_text(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  return vresult;
fail:
  return Qnil;
}
text=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlNode_texte___(int argc, VALUE *argv, VALUE self) {
  struct __WsXmlNode *arg1 = (struct __WsXmlNode *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct __WsXmlNode *","set_text", 1, self )); 
  }
  arg1 = (struct __WsXmlNode *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","set_text", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  __WsXmlNode_set_text(arg1,(char const *)arg2);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}