/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.19
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#define SWIGPYTHON

#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    inline SwigValueWrapper() : tt(0) { }
    inline ~SwigValueWrapper() { if (tt) delete tt; } 
    inline SwigValueWrapper& operator=(const T& t) { tt = new T(t); return *this; }
    inline operator T&() const { return *tt; }
    inline T *operator&() { return tt; }
};                                                    
#endif


#include "Python.h"

/***********************************************************************
 * common.swg
 *
 *     This file contains generic SWIG runtime support for pointer
 *     type checking as well as a few commonly used macros to control
 *     external linkage.
 *
 * Author : David Beazley (beazley@cs.uchicago.edu)
 *
 * Copyright (c) 1999-2000, The University of Chicago
 * 
 * This file may be freely redistributed without license or fee provided
 * this copyright message remains intact.
 ************************************************************************/

#include <string.h>

#if defined(_WIN32) || defined(__WIN32__)
#       if defined(_MSC_VER)
#               if defined(STATIC_LINKED)
#                       define SWIGEXPORT(a) a
#                       define SWIGIMPORT(a) extern a
#               else
#                       define SWIGEXPORT(a) __declspec(dllexport) a
#                       define SWIGIMPORT(a) extern a
#               endif
#       else
#               if defined(__BORLANDC__)
#                       define SWIGEXPORT(a) a _export
#                       define SWIGIMPORT(a) a _export
#               else
#                       define SWIGEXPORT(a) a
#                       define SWIGIMPORT(a) a
#               endif
#       endif
#else
#       define SWIGEXPORT(a) a
#       define SWIGIMPORT(a) a
#endif

#ifdef SWIG_GLOBAL
#define SWIGRUNTIME(a) SWIGEXPORT(a)
#else
#define SWIGRUNTIME(a) static a
#endif

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

typedef struct swig_type_info {
  const char             *name;                 
  swig_converter_func     converter;
  const char             *str;
  void                   *clientdata;	
  swig_dycast_func        dcast;
  struct swig_type_info  *next;
  struct swig_type_info  *prev;
} swig_type_info;

#ifdef SWIG_NOINCLUDE

SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);

#else

static swig_type_info *swig_type_list = 0;

/* Register a type mapping with the type-checking */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeRegister(swig_type_info *ti)
{
  swig_type_info *tc, *head, *ret, *next;
  /* Check to see if this type has already been registered */
  tc = swig_type_list;
  while (tc) {
    if (strcmp(tc->name, ti->name) == 0) {
      /* Already exists in the table.  Just add additional types to the list */
      if (tc->clientdata) ti->clientdata = tc->clientdata;	
      head = tc;
      next = tc->next;
      goto l1;
    }
    tc = tc->prev;
  }
  head = ti;
  next = 0;

  /* Place in list */
  ti->prev = swig_type_list;
  swig_type_list = ti;

  /* Build linked lists */
 l1:
  ret = head;
  tc = ti + 1;
  /* Patch up the rest of the links */
  while (tc->name) {
    head->next = tc;
    tc->prev = head;
    head = tc;
    tc++;
  }
  if (next) next->prev = head;  /**/
  head->next = next;
  return ret;
}

/* Check the typename */
SWIGRUNTIME(swig_type_info *) 
SWIG_TypeCheck(char *c, swig_type_info *ty)
{
  swig_type_info *s;
  if (!ty) return 0;        /* Void pointer */
  s = ty->next;             /* First element always just a name */
  do {
    if (strcmp(s->name,c) == 0) {
      if (s == ty->next) return s;
      /* Move s to the top of the linked list */
      s->prev->next = s->next;
      if (s->next) {
	s->next->prev = s->prev;
      }
      /* Insert s as second element in the list */
      s->next = ty->next;
      if (ty->next) ty->next->prev = s;
      ty->next = s;
      s->prev = ty;  /**/
      return s;
    }
    s = s->next;
  } while (s && (s != ty->next));
  return 0;
}

/* Cast a pointer up an inheritance hierarchy */
SWIGRUNTIME(void *) 
SWIG_TypeCast(swig_type_info *ty, void *ptr) 
{
  if ((!ty) || (!ty->converter)) return ptr;
  return (*ty->converter)(ptr);
}

/* Dynamic pointer casting. Down an inheritance hierarchy */
SWIGRUNTIME(swig_type_info *) 
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) 
{
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
     ty = (*ty->dcast)(ptr);
     if (ty) lastty = ty;
  }
  return lastty;
}

/* Return the name associated with this type */
SWIGRUNTIME(const char *)
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/* Search for a swig_type_info structure */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeQuery(const char *name) {
  swig_type_info *ty = swig_type_list;
  while (ty) {
    if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
    ty = ty->prev;
  }
  return 0;
}

/* Set the clientdata field for a type */
SWIGRUNTIME(void)
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_type_info *tc, *equiv;
  if (ti->clientdata == clientdata) return;
  ti->clientdata = clientdata;
  equiv = ti->next;
  while (equiv) {
    if (!equiv->converter) {
      tc = swig_type_list;
      while (tc) {
	if ((strcmp(tc->name, equiv->name) == 0))
	  SWIG_TypeClientData(tc,clientdata);
	tc = tc->prev;
      }
    }
    equiv = equiv->next;
  }
}
#endif

#ifdef __cplusplus
}

#endif

/***********************************************************************
 * python.swg
 *
 *     This file contains the runtime support for Python modules
 *     and includes code for managing global variables and pointer
 *     type checking.
 *
 * Author : David Beazley (beazley@cs.uchicago.edu)
 ************************************************************************/

#include "Python.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SWIG_PY_INT     1
#define SWIG_PY_FLOAT   2
#define SWIG_PY_STRING  3
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

/* Flags for pointer conversion */

#define SWIG_POINTER_EXCEPTION     0x1
#define SWIG_POINTER_DISOWN        0x2

/* Exception handling in wrappers */
#define SWIG_fail   goto fail

/* Constant information structure */
typedef struct swig_const_info {
    int type;
    char *name;
    long lvalue;
    double dvalue;
    void   *pvalue;
    swig_type_info **ptype;
} swig_const_info;

#ifdef SWIG_NOINCLUDE

SWIGEXPORT(PyObject *)        SWIG_newvarlink(void);
SWIGEXPORT(void)              SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
SWIGEXPORT(int)               SWIG_ConvertPtr(PyObject *, void **, swig_type_info *, int);
SWIGEXPORT(int)               SWIG_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
SWIGEXPORT(char *)            SWIG_PackData(char *c, void *, int);
SWIGEXPORT(char *)            SWIG_UnpackData(char *c, void *, int);
SWIGEXPORT(PyObject *)        SWIG_NewPointerObj(void *, swig_type_info *,int own);
SWIGEXPORT(PyObject *)        SWIG_NewPackedObj(void *, int sz, swig_type_info *);
SWIGEXPORT(void)              SWIG_InstallConstants(PyObject *d, swig_const_info constants[]);
#else

/* -----------------------------------------------------------------------------
 * global variable support code.
 * ----------------------------------------------------------------------------- */

typedef struct swig_globalvar {   
  char       *name;                  /* Name of global variable */
  PyObject *(*get_attr)(void);       /* Return the current value */
  int       (*set_attr)(PyObject *); /* Set the value */
  struct swig_globalvar *next;
} swig_globalvar;

typedef struct swig_varlinkobject {
  PyObject_HEAD
  swig_globalvar *vars;
} swig_varlinkobject;

static PyObject *
swig_varlink_repr(swig_varlinkobject *v) {
  v = v;
  return PyString_FromString("<Global variables>");
}

static int
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
  swig_globalvar  *var;
  flags = flags;
  fprintf(fp,"Global variables { ");
  for (var = v->vars; var; var=var->next) {
    fprintf(fp,"%s", var->name);
    if (var->next) fprintf(fp,", ");
  }
  fprintf(fp," }\n");
  return 0;
}

static PyObject *
swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      return (*var->get_attr)();
    }
    var = var->next;
  }
  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  return NULL;
}

static int
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      return (*var->set_attr)(p);
    }
    var = var->next;
  }
  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
  return 1;
}

statichere PyTypeObject varlinktype = {
  PyObject_HEAD_INIT(0)              
  0,
  (char *)"swigvarlink",                      /* Type name    */
  sizeof(swig_varlinkobject),         /* Basic size   */
  0,                                  /* Itemsize     */
  0,                                  /* Deallocator  */ 
  (printfunc) swig_varlink_print,     /* Print        */
  (getattrfunc) swig_varlink_getattr, /* get attr     */
  (setattrfunc) swig_varlink_setattr, /* Set attr     */
  0,                                  /* tp_compare   */
  (reprfunc) swig_varlink_repr,       /* tp_repr      */    
  0,                                  /* tp_as_number */
  0,                                  /* tp_as_mapping*/
  0,                                  /* tp_hash      */
};

/* Create a variable linking object for use later */
SWIGRUNTIME(PyObject *)
SWIG_newvarlink(void) {
  swig_varlinkobject *result = 0;
  result = PyMem_NEW(swig_varlinkobject,1);
  varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
  result->ob_type = &varlinktype;
  result->vars = 0;
  result->ob_refcnt = 0;
  Py_XINCREF((PyObject *) result);
  return ((PyObject*) result);
}

SWIGRUNTIME(void)
SWIG_addvarlink(PyObject *p, char *name,
	   PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  swig_varlinkobject *v;
  swig_globalvar *gv;
  v= (swig_varlinkobject *) p;
  gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  gv->name = (char *) malloc(strlen(name)+1);
  strcpy(gv->name,name);
  gv->get_attr = get_attr;
  gv->set_attr = set_attr;
  gv->next = v->vars;
  v->vars = gv;
}

/* Pack binary data into a string */
SWIGRUNTIME(char *)
SWIG_PackData(char *c, void *ptr, int sz) {
  static char hex[17] = "0123456789abcdef";
  int i;
  unsigned char *u = (unsigned char *) ptr;
  register unsigned char uu;
  for (i = 0; i < sz; i++,u++) {
    uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/* Unpack binary data from a string */
SWIGRUNTIME(char *)
SWIG_UnpackData(char *c, void *ptr, int sz) {
  register unsigned char uu = 0;
  register int d;
  unsigned char *u = (unsigned char *) ptr;
  int i;
  for (i = 0; i < sz; i++, u++) {
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    *u = uu;
  }
  return c;
}

/* Convert a pointer value */
SWIGRUNTIME(int)
SWIG_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
  swig_type_info *tc;
  char  *c;
  static PyObject *SWIG_this = 0;
  int    newref = 0;
  PyObject  *pyobj = 0;

  if (!obj) return 0;
  if (obj == Py_None) {
    *ptr = 0;
    return 0;
  }
#ifdef SWIG_COBJECT_TYPES
  if (!(PyCObject_Check(obj))) {
    if (!SWIG_this)
      SWIG_this = PyString_FromString("this");
    pyobj = obj;
    obj = PyObject_GetAttr(obj,SWIG_this);
    newref = 1;
    if (!obj) goto type_error;
    if (!PyCObject_Check(obj)) {
      Py_DECREF(obj);
      goto type_error;
    }
  }  
  *ptr = PyCObject_AsVoidPtr(obj);
  c = (char *) PyCObject_GetDesc(obj);
  if (newref) Py_DECREF(obj);
  goto cobject;
#else
  if (!(PyString_Check(obj))) {
    if (!SWIG_this)
      SWIG_this = PyString_FromString("this");
    pyobj = obj;
    obj = PyObject_GetAttr(obj,SWIG_this);
    newref = 1;
    if (!obj) goto type_error;
    if (!PyString_Check(obj)) {
      Py_DECREF(obj);
      goto type_error;
    }
  } 
  c = PyString_AsString(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') {
    *ptr = (void *) 0;
    if (strcmp(c,"NULL") == 0) {
      if (newref) { Py_DECREF(obj); }
      return 0;
    } else {
      if (newref) { Py_DECREF(obj); }
      goto type_error;
    }
  }
  c++;
  c = SWIG_UnpackData(c,ptr,sizeof(void *));
  if (newref) { Py_DECREF(obj); }
#endif

#ifdef SWIG_COBJECT_TYPES
cobject:
#endif

  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) goto type_error;
    *ptr = SWIG_TypeCast(tc,(void*) *ptr);
  }

  if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
      PyObject *zero = PyInt_FromLong(0);
      PyObject_SetAttrString(pyobj,(char*)"thisown",zero);
      Py_DECREF(zero);
  }
  return 0;

type_error:
  if (flags & SWIG_POINTER_EXCEPTION) {
    if (ty) {
      char *temp = (char *) malloc(64+strlen(ty->name));
      sprintf(temp,"Type error. Expected %s", ty->name);
      PyErr_SetString(PyExc_TypeError, temp);
      free((char *) temp);
    } else {
      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
    }
  }
  return -1;
}

/* Convert a packed value value */
SWIGRUNTIME(int)
SWIG_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
  swig_type_info *tc;
  char  *c;

  if ((!obj) || (!PyString_Check(obj))) goto type_error;
  c = PyString_AsString(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') goto type_error;
  c++;
  c = SWIG_UnpackData(c,ptr,sz);
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) goto type_error;
  }
  return 0;

type_error:

  if (flags) {
    if (ty) {
      char *temp = (char *) malloc(64+strlen(ty->name));
      sprintf(temp,"Type error. Expected %s", ty->name);
      PyErr_SetString(PyExc_TypeError, temp);
      free((char *) temp);
    } else {
      PyErr_SetString(PyExc_TypeError,"Expected a pointer");
    }
  }
  return -1;
}

/* Create a new pointer object */
SWIGRUNTIME(PyObject *)
SWIG_NewPointerObj(void *ptr, swig_type_info *type, int own) {
  PyObject *robj;
  if (!ptr) {
    Py_INCREF(Py_None);
    return Py_None;
  }
#ifdef SWIG_COBJECT_TYPES
  robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
#else
  {
    char result[1024];
    char *r = result;
    *(r++) = '_';
    r = SWIG_PackData(r,&ptr,sizeof(void *));
    strcpy(r,type->name);
    robj = PyString_FromString(result);
  }
#endif
  if (!robj || (robj == Py_None)) return robj;
  if (type->clientdata) {
    PyObject *inst;
    PyObject *args = Py_BuildValue((char*)"(O)", robj);
    Py_DECREF(robj);
    inst = PyObject_CallObject((PyObject *) type->clientdata, args);
    Py_DECREF(args);
    if (inst) {
      if (own) {
	PyObject *n = PyInt_FromLong(1);
	PyObject_SetAttrString(inst,(char*)"thisown",n);
	Py_DECREF(n);
      }
      robj = inst;
    }
  }
  return robj;
}

SWIGRUNTIME(PyObject *)
SWIG_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  strcpy(r,type->name);
  return PyString_FromString(result);
}

/* Install Constants */
SWIGRUNTIME(void)
SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
  int i;
  PyObject *obj;
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_PY_INT:
      obj = PyInt_FromLong(constants[i].lvalue);
      break;
    case SWIG_PY_FLOAT:
      obj = PyFloat_FromDouble(constants[i].dvalue);
      break;
    case SWIG_PY_STRING:
      obj = PyString_FromString((char *) constants[i].pvalue);
      break;
    case SWIG_PY_POINTER:
      obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
      break;
    case SWIG_PY_BINARY:
      obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
      break;
    default:
      obj = 0;
      break;
    }
    if (obj) {
      PyDict_SetItemString(d,constants[i].name,obj);
      Py_DECREF(obj);
    }
  }
}

#endif

#ifdef __cplusplus
}
#endif








/* -------- TYPES TABLE (BEGIN) -------- */

#define  SWIGTYPE_p_XmlIndexSpecification swig_types[0] 
#define  SWIGTYPE_p_XmlModify swig_types[1] 
#define  SWIGTYPE_p_DbEnv swig_types[2] 
#define  SWIGTYPE_p_XmlIndexDeclaration swig_types[3] 
#define  SWIGTYPE_p_Dbt swig_types[4] 
#define  SWIGTYPE_p_XmlDocument swig_types[5] 
#define  SWIGTYPE_p_XmlResults swig_types[6] 
#define  SWIGTYPE_p_XmlValue swig_types[7] 
#define  SWIGTYPE_p_XmlContainer swig_types[8] 
#define  SWIGTYPE_p_XmlUpdateContext swig_types[9] 
#define  SWIGTYPE_p_XmlQueryContext swig_types[10] 
#define  SWIGTYPE_p_u_int32_t swig_types[11] 
#define  SWIGTYPE_p_XmlQueryExpression swig_types[12] 
static swig_type_info *swig_types[14];

/* -------- TYPES TABLE (END) -------- */


/*-----------------------------------------------
              @(target):= _dbxml.so
  ------------------------------------------------*/
#define SWIG_init    init_dbxml

#define SWIG_name    "_dbxml"

#define  SWIG_MemoryError    1
#define  SWIG_IOError        2
#define  SWIG_RuntimeError   3
#define  SWIG_IndexError     4
#define  SWIG_TypeError      5
#define  SWIG_DivisionByZero 6
#define  SWIG_OverflowError  7
#define  SWIG_SyntaxError    8
#define  SWIG_ValueError     9
#define  SWIG_SystemError   10
#define  SWIG_UnknownError  99


static void _SWIG_exception(int code, const char *msg) {
  switch(code) {
  case SWIG_MemoryError:
    PyErr_SetString(PyExc_MemoryError,msg);
    break;
  case SWIG_IOError:
    PyErr_SetString(PyExc_IOError,msg);
    break;
  case SWIG_RuntimeError:
    PyErr_SetString(PyExc_RuntimeError,msg);
    break;
  case SWIG_IndexError:
    PyErr_SetString(PyExc_IndexError,msg);
    break;
  case SWIG_TypeError:
    PyErr_SetString(PyExc_TypeError,msg);
    break;
  case SWIG_DivisionByZero:
    PyErr_SetString(PyExc_ZeroDivisionError,msg);
    break;
  case SWIG_OverflowError:
    PyErr_SetString(PyExc_OverflowError,msg);
    break;
  case SWIG_SyntaxError:
    PyErr_SetString(PyExc_SyntaxError,msg);
    break;
  case SWIG_ValueError:
    PyErr_SetString(PyExc_ValueError,msg);
    break;
  case SWIG_SystemError:
    PyErr_SetString(PyExc_SystemError,msg);
    break;
  default:
    PyErr_SetString(PyExc_RuntimeError,msg);
    break;
  }
}

#define SWIG_exception(a,b) { _SWIG_exception(a,b); SWIG_fail; }


#include "db_cxx.h"
#include "dbxml/DbXml.hpp"
#include <errno.h>
#include <fstream>

using namespace DbXml;

class XmlIndexDeclaration {
public:
	XmlIndexDeclaration() {}
	XmlIndexDeclaration(const std::string &uri, const std::string &name, const std::string &index) : uri(uri), name(name), index(index) {}

	std::string uri, name, index;
};


#include <string>


/* Copied from bsddb3 source. This will break if bsddb3 changes, but
   that would be very unlikely, since this is pretty much the standard
   way to do Python wrappers ;) */

typedef struct {
    PyObject_HEAD
    DB_ENV*     db_env;
    int         flags;             /* saved flags from open() */
    int         closed;
    int         getReturnsNone;
} DBEnvObject;

typedef struct {
    PyObject_HEAD
    DB_TXN*         txn;
} DBTxnObject;

static XmlIndexSpecification *XmlContainer_getIndexSpecification(XmlContainer const *self,DbTxn *txn){
		return new XmlIndexSpecification(self->getIndexSpecification(txn));
	}
static XmlDocument *XmlContainer_getDocument(XmlContainer *self,DbTxn *txn,u_int32_t id,u_int32_t flags){
		return new XmlDocument(self->getDocument(txn, id, flags));
	}
static XmlQueryExpression *XmlContainer_parseXPathExpression(XmlContainer const *self,DbTxn *txn,std::string const &query,XmlQueryContext *context){
		return new XmlQueryExpression(self->parseXPathExpression(txn, query, context));
	}
static XmlResults *XmlContainer_queryWithXPath__SWIG_0(XmlContainer const *self,DbTxn *txn,std::string const &query,XmlQueryContext *context,u_int32_t flags){
		return new XmlResults(self->queryWithXPath(txn, query, context, flags));
	}
static XmlResults *XmlContainer_queryWithXPath__SWIG_1(XmlContainer const *self,DbTxn *txn,XmlQueryExpression &query,u_int32_t flags){
		return new XmlResults(self->queryWithXPath(txn, query, flags));
	}
static u_int32_t *XmlContainer_query(XmlContainer const *self,DbTxn *txn,char const *query,XmlQueryContext *context){
		// XXX: if context != NULL, should check return type
		XmlResults results = self->queryWithXPath(txn, query, context);
		XmlValue xval;
		
		int num_vals = 0;
		while (results.next(xval))
			++num_vals;
		results.reset();
		u_int32_t *vals = new u_int32_t[num_vals + 1];
		for (int i = 0; i < num_vals; i++) {
			results.next(xval);
			vals[i] = xval.asDocument(context).getID();
		}
		vals[num_vals] = 0;
		return vals;
	}
static void XmlContainer_dump(XmlContainer *self,char const *filename,u_int32_t flags){
		std::ofstream out(filename);
		self->dump(&out, flags);
		out.close();
	}
static void XmlContainer_load(XmlContainer *self,char const *filename,u_int32_t flags){
		std::ifstream in(filename);
		unsigned long lineno = 0;
		self->load(&in, &lineno, flags);
		in.close();
	}
static void XmlContainer_verify(XmlContainer *self,char const *filename,u_int32_t flags){
		std::ofstream out;
		if (flags & DB_SALVAGE)
			out.open(filename);
		self->verify(&out, flags);
		if (flags & DB_SALVAGE)
			out.close();
	}
void XmlContainer_setLogLevel(LogLevel level,bool enabled){
		DbXml::setLogLevel(level, enabled);
	}
void XmlContainer_setLogCategory(LogCategory category,bool enabled){
		DbXml::setLogCategory(category, enabled);
	}
int XmlContainer_get_version_major(){
		int major;
		(void)dbxml_version(&major, NULL, NULL);
		return major;
	}
int XmlContainer_get_version_minor(){
		int minor;
		(void)dbxml_version(NULL, &minor, NULL);
		return minor;
	}
int XmlContainer_get_version_patch(){
		int patch;
		(void)dbxml_version(NULL, NULL, &patch);
		return patch;
	}
char const *XmlContainer_get_version_string(){
		return dbxml_version(NULL, NULL, NULL);
	}
static std::string XmlDocument_getContentAsString(XmlDocument const *self){
		std::string s;
		return self->getContentAsString(s);
	}
static XmlResults *XmlDocument_queryWithXPath__SWIG_0(XmlDocument const *self,std::string const &query,XmlQueryContext *context){
		return new XmlResults(self->queryWithXPath(query, context));
	}
static XmlResults *XmlDocument_queryWithXPath__SWIG_1(XmlDocument const *self,XmlQueryExpression &query){
		return new XmlResults(self->queryWithXPath(query));
	}
static XmlValue *XmlQueryContext_getVariableValue(XmlQueryContext *self,std::string const &name){
		XmlValue *value = new XmlValue;
		if (self->getVariableValue(name, *value))
			return value;
		else {
			delete value;
			return NULL;
		}
	}
static XmlValue *XmlResults_next__SWIG_0(XmlResults *self){
		XmlValue *value = new XmlValue;
		if (self->next(*value))
			return value;
		else {
			delete value;
			return NULL;
		}
	}
static XmlValue *XmlResults_next__SWIG_3(XmlResults *self,DbTxn *txn){
	        XmlValue *value = new XmlValue;
		if (self->next(*value))
			return value;
		else {
			delete value;
			return NULL;
		}
	}
static bool XmlResults_nextDocument(XmlResults *self,DbTxn *txn,XmlDocument &document){
                return (self->next(document));
        }
static bool XmlResults_nextDocumentAndValue(XmlResults *self,DbTxn *txn,XmlDocument &document,XmlValue &value){
                return (self->next(document, value));
        }
static XmlIndexDeclaration *XmlIndexSpecification_find(XmlIndexSpecification *self,std::string const &uri,std::string const &name){
		XmlIndexDeclaration *idecl = new XmlIndexDeclaration(uri, name, "");
		if (self->find(idecl->uri, idecl->name, idecl->index))
			return idecl;
		else {
			delete idecl;
			return NULL;
		}
	}
static XmlIndexDeclaration *XmlIndexSpecification_next(XmlIndexSpecification *self){
		XmlIndexDeclaration *idecl = new XmlIndexDeclaration;
		if (self->next(idecl->uri, idecl->name, idecl->index))
			return idecl;
		else {
			delete idecl;
			return NULL;
		}
	}
static char const *XmlIndexDeclaration_get_uri(XmlIndexDeclaration const *self){ return self->uri.c_str(); }
static char const *XmlIndexDeclaration_get_name(XmlIndexDeclaration const *self){ return self->name.c_str(); }
static char const *XmlIndexDeclaration_get_index(XmlIndexDeclaration const *self){ return self->index.c_str(); }
static char const *XmlQueryExpression_getXPathQuery(XmlQueryExpression const *self){
		return self->getXPathQuery().c_str();
	}
#ifdef __cplusplus
extern "C" {
#endif
static PyObject *_wrap_new_XmlContainer(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    DbEnv *arg1 = (DbEnv *) 0 ;
    std::string *arg2 = 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    XmlContainer *result;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:new_XmlContainer",&obj0,&obj1,&obj2)) goto fail;
    {
        arg1 = (obj0 == Py_None) ? 
        NULL : DbEnv::wrap_DB_ENV(((DBEnvObject *)obj0)->db_env);
    }
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if (obj2) {
        arg3 = (u_int32_t) PyInt_AsLong(obj2);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            result = (XmlContainer *)new XmlContainer(arg1,(std::string const &)*arg2,arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlContainer, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlContainer(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlContainer",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_setPageSize(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlContainer_setPageSize",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    arg2 = (u_int32_t) PyInt_AsLong(obj1);
    if (PyErr_Occurred()) SWIG_fail;
    {
        try {
            (arg1)->setPageSize(arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_open(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    int arg4 = (int) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|Oi:XmlContainer_open",&obj0,&obj1,&obj2,&arg4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if (obj2) {
        arg3 = (u_int32_t) PyInt_AsLong(obj2);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->open(arg2,arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_exists(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlContainer_exists",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        try {
            result = (bool)(arg1)->exists(arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_isOpen(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlContainer_isOpen",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (bool)((XmlContainer const *)arg1)->isOpen();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_close(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlContainer_close",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        arg2 = (u_int32_t) PyInt_AsLong(obj1);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->close(arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_setIndexSpecification(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlIndexSpecification *arg3 = 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:XmlContainer_setIndexSpecification",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            (arg1)->setIndexSpecification(arg2,(XmlIndexSpecification const &)*arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_addIndex(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    std::string temp3 ;
    std::string temp4 ;
    std::string temp5 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOOO:XmlContainer_addIndex",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj4)) {
            temp5.assign(PyString_AsString(obj4));
            arg5 = &temp5;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->addIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_deleteIndex(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    std::string temp3 ;
    std::string temp4 ;
    std::string temp5 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOOO:XmlContainer_deleteIndex",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj4)) {
            temp5.assign(PyString_AsString(obj4));
            arg5 = &temp5;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->deleteIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_replaceIndex(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    std::string temp3 ;
    std::string temp4 ;
    std::string temp5 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOOO:XmlContainer_replaceIndex",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj4)) {
            temp5.assign(PyString_AsString(obj4));
            arg5 = &temp5;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->replaceIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_upgrade(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlContainer_upgrade",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        arg2 = (u_int32_t) PyInt_AsLong(obj1);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->upgrade(arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_getIndexSpecification(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlIndexSpecification *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlContainer_getIndexSpecification",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        try {
            result = (XmlIndexSpecification *)XmlContainer_getIndexSpecification((XmlContainer const *)arg1,arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlIndexSpecification, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_getName(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    std::string *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlContainer_getName",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            {
                std::string const &_result_ref = ((XmlContainer const *)arg1)->getName();
                result = (std::string *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        resultobj = PyString_FromStringAndSize(result->data(),result->size());
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_setName(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlContainer_setName",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->setName((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_putDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    u_int32_t result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|OO:XmlContainer_putDocument",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    if (obj4) {
        arg5 = (u_int32_t) PyInt_AsLong(obj4);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            result = (u_int32_t)(arg1)->putDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_updateDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|O:XmlContainer_updateDocument",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            (arg1)->updateDocument(arg2,*arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_remove(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:XmlContainer_remove",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if (obj2) {
        arg3 = (u_int32_t) PyInt_AsLong(obj2);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->remove(arg2,arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_rename(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    std::string temp3 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|O:XmlContainer_rename",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if (obj3) {
        arg4 = (u_int32_t) PyInt_AsLong(obj3);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->rename(arg2,(std::string const &)*arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_deleteDocument__SWIG_0(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|OO:XmlContainer_deleteDocument",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    arg3 = (u_int32_t) PyInt_AsLong(obj2);
    if (PyErr_Occurred()) SWIG_fail;
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    if (obj4) {
        arg5 = (u_int32_t) PyInt_AsLong(obj4);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->deleteDocument(arg2,arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_deleteDocument__SWIG_1(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|OO:XmlContainer_deleteDocument",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    if (obj4) {
        arg5 = (u_int32_t) PyInt_AsLong(obj4);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->deleteDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_deleteDocument(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[6];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 5); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if ((argc >= 3) && (argc <= 5)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlContainer, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                /* This would be a typecheck for a DbTxn *; just succeed */
                _v = 1; 
            }
            if (_v) {
                {
                    void *ptr;
                    if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == -1) {
                        _v = 0;
                        PyErr_Clear();
                    }else {
                        _v = 1;
                    }
                }
                if (_v) {
                    if (argc <= 3) {
                        return _wrap_XmlContainer_deleteDocument__SWIG_1(self,args);
                    }
                    {
                        void *ptr;
                        if (SWIG_ConvertPtr(argv[3], (void **) &ptr, SWIGTYPE_p_XmlUpdateContext, 0) == -1) {
                            _v = 0;
                            PyErr_Clear();
                        }else {
                            _v = 1;
                        }
                    }
                    if (_v) {
                        if (argc <= 4) {
                            return _wrap_XmlContainer_deleteDocument__SWIG_1(self,args);
                        }
                        {
                            _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
                        }
                        if (_v) {
                            return _wrap_XmlContainer_deleteDocument__SWIG_1(self,args);
                        }
                    }
                }
            }
        }
    }
    if ((argc >= 3) && (argc <= 5)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlContainer, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                /* This would be a typecheck for a DbTxn *; just succeed */
                _v = 1; 
            }
            if (_v) {
                {
                    _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0;
                }
                if (_v) {
                    if (argc <= 3) {
                        return _wrap_XmlContainer_deleteDocument__SWIG_0(self,args);
                    }
                    {
                        void *ptr;
                        if (SWIG_ConvertPtr(argv[3], (void **) &ptr, SWIGTYPE_p_XmlUpdateContext, 0) == -1) {
                            _v = 0;
                            PyErr_Clear();
                        }else {
                            _v = 1;
                        }
                    }
                    if (_v) {
                        if (argc <= 4) {
                            return _wrap_XmlContainer_deleteDocument__SWIG_0(self,args);
                        }
                        {
                            _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
                        }
                        if (_v) {
                            return _wrap_XmlContainer_deleteDocument__SWIG_0(self,args);
                        }
                    }
                }
            }
        }
    }
    
    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'XmlContainer_deleteDocument'");
    return NULL;
}


static PyObject *_wrap_XmlContainer_modifyDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlModify *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|OO:XmlContainer_modifyDocument",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    if (obj4) {
        arg5 = (u_int32_t) PyInt_AsLong(obj4);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            (arg1)->modifyDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_getDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    XmlDocument *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|O:XmlContainer_getDocument",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    arg3 = (u_int32_t) PyInt_AsLong(obj2);
    if (PyErr_Occurred()) SWIG_fail;
    if (obj3) {
        arg4 = (u_int32_t) PyInt_AsLong(obj3);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            result = (XmlDocument *)XmlContainer_getDocument(arg1,arg2,arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlDocument, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_parseXPathExpression(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    XmlQueryExpression *result;
    std::string temp3 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|O:XmlContainer_parseXPathExpression",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (XmlQueryExpression *)XmlContainer_parseXPathExpression((XmlContainer const *)arg1,arg2,(std::string const &)*arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlQueryExpression, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_queryWithXPath__SWIG_0(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    XmlResults *result;
    std::string temp3 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|OO:XmlContainer_queryWithXPath",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    if (obj4) {
        arg5 = (u_int32_t) PyInt_AsLong(obj4);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            result = (XmlResults *)XmlContainer_queryWithXPath__SWIG_0((XmlContainer const *)arg1,arg2,(std::string const &)*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlResults, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_queryWithXPath__SWIG_1(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlQueryExpression *arg3 = 0 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    XmlResults *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO|O:XmlContainer_queryWithXPath",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj3) {
        arg4 = (u_int32_t) PyInt_AsLong(obj3);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            result = (XmlResults *)XmlContainer_queryWithXPath__SWIG_1((XmlContainer const *)arg1,arg2,*arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlResults, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_queryWithXPath(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[6];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 5); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if ((argc >= 3) && (argc <= 4)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlContainer, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                /* This would be a typecheck for a DbTxn *; just succeed */
                _v = 1; 
            }
            if (_v) {
                {
                    void *ptr;
                    if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_XmlQueryExpression, 0) == -1) {
                        _v = 0;
                        PyErr_Clear();
                    }else {
                        _v = 1;
                    }
                }
                if (_v) {
                    if (argc <= 3) {
                        return _wrap_XmlContainer_queryWithXPath__SWIG_1(self,args);
                    }
                    {
                        _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
                    }
                    if (_v) {
                        return _wrap_XmlContainer_queryWithXPath__SWIG_1(self,args);
                    }
                }
            }
        }
    }
    if ((argc >= 3) && (argc <= 5)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlContainer, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                /* This would be a typecheck for a DbTxn *; just succeed */
                _v = 1; 
            }
            if (_v) {
                {
                    _v = PyString_Check(argv[2]) ? 1 : 0;
                }
                if (_v) {
                    if (argc <= 3) {
                        return _wrap_XmlContainer_queryWithXPath__SWIG_0(self,args);
                    }
                    {
                        void *ptr;
                        if (SWIG_ConvertPtr(argv[3], (void **) &ptr, SWIGTYPE_p_XmlQueryContext, 0) == -1) {
                            _v = 0;
                            PyErr_Clear();
                        }else {
                            _v = 1;
                        }
                    }
                    if (_v) {
                        if (argc <= 4) {
                            return _wrap_XmlContainer_queryWithXPath__SWIG_0(self,args);
                        }
                        {
                            _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
                        }
                        if (_v) {
                            return _wrap_XmlContainer_queryWithXPath__SWIG_0(self,args);
                        }
                    }
                }
            }
        }
    }
    
    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'XmlContainer_queryWithXPath'");
    return NULL;
}


static PyObject *_wrap_XmlContainer_query(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    char *arg3 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    u_int32_t *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOs|O:XmlContainer_query",&obj0,&obj1,&arg3,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if (obj3) {
        if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (u_int32_t *)XmlContainer_query((XmlContainer const *)arg1,arg2,(char const *)arg3,arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_u_int32_t, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_dump(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"Os|O:XmlContainer_dump",&obj0,&arg2,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj2) {
        arg3 = (u_int32_t) PyInt_AsLong(obj2);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            XmlContainer_dump(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_load(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"Os|O:XmlContainer_load",&obj0,&arg2,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj2) {
        arg3 = (u_int32_t) PyInt_AsLong(obj2);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            XmlContainer_load(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_verify(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"Os|O:XmlContainer_verify",&obj0,&arg2,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj2) {
        arg3 = (u_int32_t) PyInt_AsLong(obj2);
        if (PyErr_Occurred()) SWIG_fail;
    }
    {
        try {
            XmlContainer_verify(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_setLogLevel(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg1 ;
    bool arg2 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"iO:XmlContainer_setLogLevel",&arg1,&obj1)) goto fail;
    arg2 = PyInt_AsLong(obj1) ? true : false;
    if (PyErr_Occurred()) SWIG_fail;
    {
        try {
            XmlContainer_setLogLevel((LogLevel )arg1,arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_setLogCategory(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg1 ;
    bool arg2 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"iO:XmlContainer_setLogCategory",&arg1,&obj1)) goto fail;
    arg2 = PyInt_AsLong(obj1) ? true : false;
    if (PyErr_Occurred()) SWIG_fail;
    {
        try {
            XmlContainer_setLogCategory((LogCategory )arg1,arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_get_version_major(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":XmlContainer_get_version_major")) goto fail;
    {
        try {
            result = (int)XmlContainer_get_version_major();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_get_version_minor(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":XmlContainer_get_version_minor")) goto fail;
    {
        try {
            result = (int)XmlContainer_get_version_minor();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_get_version_patch(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int result;
    
    if(!PyArg_ParseTuple(args,(char *)":XmlContainer_get_version_patch")) goto fail;
    {
        try {
            result = (int)XmlContainer_get_version_patch();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlContainer_get_version_string(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *result;
    
    if(!PyArg_ParseTuple(args,(char *)":XmlContainer_get_version_string")) goto fail;
    {
        try {
            result = (char *)XmlContainer_get_version_string();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlContainer_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlContainer, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *result;
    
    if(!PyArg_ParseTuple(args,(char *)":new_XmlDocument")) goto fail;
    {
        try {
            result = (XmlDocument *)new XmlDocument();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlDocument, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlDocument",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_getID(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    u_int32_t result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlDocument_getID",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (u_int32_t)((XmlDocument const *)arg1)->getID();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_setName(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlDocument_setName",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->setName((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_getName(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlDocument_getName",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = ((XmlDocument const *)arg1)->getName();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        resultobj = PyString_FromStringAndSize((&result)->data(),(&result)->size());
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_setContent(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    Dbt *arg2 = 0 ;
    Dbt dbt2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlDocument_setContent",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        dbt2.set_data(PyString_AsString(obj1));
        dbt2.set_size(PyString_Size(obj1));
        arg2 = &dbt2;
    }
    {
        try {
            (arg1)->setContent(*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_getContent(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    Dbt *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlDocument_getContent",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (Dbt *)((XmlDocument const *)arg1)->getContent();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        if (result)
        resultobj = PyString_FromStringAndSize((char *)result->get_data(), result->get_size());
        else
        resultobj = NULL;
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_modifyDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    XmlModify *arg2 = 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlDocument_modifyDocument",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            (arg1)->modifyDocument(*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_getContentAsString(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlDocument_getContentAsString",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = XmlDocument_getContentAsString((XmlDocument const *)arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        resultobj = PyString_FromStringAndSize((&result)->data(),(&result)->size());
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_setMetaData(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    XmlValue *arg5 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOOO:XmlDocument_setMetaData",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg5 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            (arg1)->setMetaData((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(XmlValue const &)*arg5);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_getMetaData(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    XmlValue *arg4 = 0 ;
    bool result;
    std::string temp2 ;
    std::string temp3 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOO:XmlDocument_getMetaData",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg4 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (bool)(arg1)->getMetaData((std::string const &)*arg2,(std::string const &)*arg3,*arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_queryWithXPath__SWIG_0(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    XmlQueryContext *arg3 = (XmlQueryContext *) 0 ;
    XmlResults *result;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:XmlDocument_queryWithXPath",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if (obj2) {
        if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (XmlResults *)XmlDocument_queryWithXPath__SWIG_0((XmlDocument const *)arg1,(std::string const &)*arg2,arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlResults, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_queryWithXPath__SWIG_1(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    XmlQueryExpression *arg2 = 0 ;
    XmlResults *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlDocument_queryWithXPath",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (XmlResults *)XmlDocument_queryWithXPath__SWIG_1((XmlDocument const *)arg1,*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlResults, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlDocument_queryWithXPath(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[4];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 3); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if (argc == 2) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                void *ptr;
                if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_XmlQueryExpression, 0) == -1) {
                    _v = 0;
                    PyErr_Clear();
                }else {
                    _v = 1;
                }
            }
            if (_v) {
                return _wrap_XmlDocument_queryWithXPath__SWIG_1(self,args);
            }
        }
    }
    if ((argc >= 2) && (argc <= 3)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                _v = PyString_Check(argv[1]) ? 1 : 0;
            }
            if (_v) {
                if (argc <= 2) {
                    return _wrap_XmlDocument_queryWithXPath__SWIG_0(self,args);
                }
                {
                    void *ptr;
                    if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_XmlQueryContext, 0) == -1) {
                        _v = 0;
                        PyErr_Clear();
                    }else {
                        _v = 1;
                    }
                }
                if (_v) {
                    return _wrap_XmlDocument_queryWithXPath__SWIG_0(self,args);
                }
            }
        }
    }
    
    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'XmlDocument_queryWithXPath'");
    return NULL;
}


static PyObject * XmlDocument_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlDocument, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlQueryContext(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg1 = (int) XmlQueryContext::ResultDocuments ;
    int arg2 = (int) XmlQueryContext::Eager ;
    XmlQueryContext *result;
    
    if(!PyArg_ParseTuple(args,(char *)"|ii:new_XmlQueryContext",&arg1,&arg2)) goto fail;
    {
        try {
            result = (XmlQueryContext *)new XmlQueryContext((XmlQueryContext::ReturnType )arg1,(XmlQueryContext::EvaluationType )arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlQueryContext, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlQueryContext(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlQueryContext",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_setNamespace(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:XmlQueryContext_setNamespace",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->setNamespace((std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_getNamespace(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string result;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlQueryContext_getNamespace",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            result = (arg1)->getNamespace((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        resultobj = PyString_FromStringAndSize((&result)->data(),(&result)->size());
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_removeNamespace(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlQueryContext_removeNamespace",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->removeNamespace((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_clearNamespaces(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryContext_clearNamespaces",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            (arg1)->clearNamespaces();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_setVariableValue(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    XmlValue *arg3 = 0 ;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:XmlQueryContext_setVariableValue",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            (arg1)->setVariableValue((std::string const &)*arg2,(XmlValue const &)*arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_setReturnType(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int arg2 = (int) XmlQueryContext::ResultDocuments ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|i:XmlQueryContext_setReturnType",&obj0,&arg2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            (arg1)->setReturnType((XmlQueryContext::ReturnType )arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_getReturnType(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryContext_getReturnType",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (int)((XmlQueryContext const *)arg1)->getReturnType();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_setEvaluationType(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int arg2 = (int) XmlQueryContext::Eager ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|i:XmlQueryContext_setEvaluationType",&obj0,&arg2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            (arg1)->setEvaluationType((XmlQueryContext::EvaluationType )arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_getEvaluationType(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryContext_getEvaluationType",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (int)((XmlQueryContext const *)arg1)->getEvaluationType();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_setWithMetaData(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    bool arg2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlQueryContext_setWithMetaData",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    arg2 = PyInt_AsLong(obj1) ? true : false;
    if (PyErr_Occurred()) SWIG_fail;
    {
        try {
            (arg1)->setWithMetaData(arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_getWithMetaData(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryContext_getWithMetaData",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (bool)((XmlQueryContext const *)arg1)->getWithMetaData();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryContext_getVariableValue(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    XmlValue *result;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlQueryContext_getVariableValue",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            result = (XmlValue *)XmlQueryContext_getVariableValue(arg1,(std::string const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlQueryContext_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlQueryContext, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlResults(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryContext *arg1 = 0 ;
    DbTxn *arg2 = (DbTxn *) NULL ;
    XmlResults *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:new_XmlResults",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg1 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj1) {
        {
            arg2 = (obj1 == Py_None) ?
            NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
        }
    }
    {
        try {
            result = (XmlResults *)new XmlResults(*arg1,arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlResults, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlResults(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlResults",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_next__SWIG_0(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlValue *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlResults_next",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (XmlValue *)XmlResults_next__SWIG_0(arg1);
            
            if (!result) {
                PyErr_SetString(PyExc_StopIteration, "End of results.");
                return NULL;
            }
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_next__SWIG_1(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlDocument *arg2 = 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlResults_next",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (bool)(arg1)->next(*arg2);
            
            if (!result) {
                PyErr_SetString(PyExc_StopIteration, "End of results.");
                return NULL;
            }
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_next__SWIG_2(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlDocument *arg2 = 0 ;
    XmlValue *arg3 = 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:XmlResults_next",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (bool)(arg1)->next(*arg2,*arg3);
            
            if (!result) {
                PyErr_SetString(PyExc_StopIteration, "End of results.");
                return NULL;
            }
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_next__SWIG_3(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlValue *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlResults_next",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    {
        try {
            result = (XmlValue *)XmlResults_next__SWIG_3(arg1,arg2);
            
            if (!result) {
                PyErr_SetString(PyExc_StopIteration, "End of results.");
                return NULL;
            }
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_next(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[4];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 3); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if (argc == 1) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            return _wrap_XmlResults_next__SWIG_0(self,args);
        }
    }
    if (argc == 2) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                void *ptr;
                if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == -1) {
                    _v = 0;
                    PyErr_Clear();
                }else {
                    _v = 1;
                }
            }
            if (_v) {
                return _wrap_XmlResults_next__SWIG_1(self,args);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                /* This would be a typecheck for a DbTxn *; just succeed */
                _v = 1; 
            }
            if (_v) {
                return _wrap_XmlResults_next__SWIG_3(self,args);
            }
        }
    }
    if (argc == 3) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                void *ptr;
                if (SWIG_ConvertPtr(argv[1], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == -1) {
                    _v = 0;
                    PyErr_Clear();
                }else {
                    _v = 1;
                }
            }
            if (_v) {
                {
                    void *ptr;
                    if (SWIG_ConvertPtr(argv[2], (void **) &ptr, SWIGTYPE_p_XmlValue, 0) == -1) {
                        _v = 0;
                        PyErr_Clear();
                    }else {
                        _v = 1;
                    }
                }
                if (_v) {
                    return _wrap_XmlResults_next__SWIG_2(self,args);
                }
            }
        }
    }
    
    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'XmlResults_next'");
    return NULL;
}


static PyObject *_wrap_XmlResults_nextDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:XmlResults_nextDocument",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (bool)XmlResults_nextDocument(arg1,arg2,*arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_nextDocumentAndValue(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlValue *arg4 = 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOO:XmlResults_nextDocumentAndValue",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        arg2 = (obj1 == Py_None) ?
        NULL : DbTxn::wrap_DB_TXN(((DBTxnObject *)obj1)->txn);
    }
    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg3 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg4 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (bool)XmlResults_nextDocumentAndValue(arg1,arg2,*arg3,*arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_reset(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlResults_reset",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            (arg1)->reset();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_size(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    size_t result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlResults_size",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = ((XmlResults const *)arg1)->size();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlResults_add(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlValue *arg2 = 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlResults_add",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            (arg1)->add((XmlValue const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlResults_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlResults, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlUpdateContext(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = 0 ;
    XmlUpdateContext *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:new_XmlUpdateContext",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg1 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (XmlUpdateContext *)new XmlUpdateContext(*arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlUpdateContext, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlUpdateContext(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlUpdateContext *arg1 = (XmlUpdateContext *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlUpdateContext",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlUpdateContext_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlUpdateContext, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlValue__SWIG_0(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *result;
    
    if(!PyArg_ParseTuple(args,(char *)":new_XmlValue")) goto fail;
    {
        try {
            result = (XmlValue *)new XmlValue();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlValue__SWIG_1(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlDocument *arg1 = 0 ;
    XmlValue *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:new_XmlValue",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg1 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (XmlValue *)new XmlValue(*arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlValue__SWIG_2(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    double arg1 ;
    XmlValue *result;
    
    if(!PyArg_ParseTuple(args,(char *)"d:new_XmlValue",&arg1)) goto fail;
    {
        try {
            result = (XmlValue *)new XmlValue(arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlValue__SWIG_3(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    char *arg1 ;
    XmlValue *result;
    
    if(!PyArg_ParseTuple(args,(char *)"s:new_XmlValue",&arg1)) goto fail;
    {
        try {
            result = (XmlValue *)new XmlValue((char const *)arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlValue__SWIG_4(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    bool arg1 ;
    XmlValue *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:new_XmlValue",&obj0)) goto fail;
    arg1 = PyInt_AsLong(obj0) ? true : false;
    if (PyErr_Occurred()) SWIG_fail;
    {
        try {
            result = (XmlValue *)new XmlValue(arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlValue__SWIG_5(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    int arg1 ;
    char *arg2 ;
    XmlValue *result;
    
    if(!PyArg_ParseTuple(args,(char *)"is:new_XmlValue",&arg1,&arg2)) goto fail;
    {
        try {
            result = (XmlValue *)new XmlValue((XmlValue::Type )arg1,(char const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlValue, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlValue(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[3];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 2); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if (argc == 0) {
        return _wrap_new_XmlValue__SWIG_0(self,args);
    }
    if (argc == 1) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_1(self,args);
        }
    }
    if (argc == 1) {
        int _v;
        {
            _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_4(self,args);
        }
    }
    if (argc == 1) {
        int _v;
        {
            _v = (PyFloat_Check(argv[0]) || PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_2(self,args);
        }
    }
    if (argc == 1) {
        int _v;
        {
            _v = PyString_Check(argv[0]) ? 1 : 0;
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_3(self,args);
        }
    }
    if (argc == 2) {
        int _v;
        {
            _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
        }
        if (_v) {
            {
                _v = PyString_Check(argv[1]) ? 1 : 0;
            }
            if (_v) {
                return _wrap_new_XmlValue__SWIG_5(self,args);
            }
        }
    }
    
    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_XmlValue'");
    return NULL;
}


static PyObject *_wrap_delete_XmlValue(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlValue",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_getType(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_getType",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (int)((XmlValue const *)arg1)->getType((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isNumber(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_isNumber",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNumber((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isString(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_isString",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isString((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isBoolean(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_isBoolean",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isBoolean((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isNode(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_isNode",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNode((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_isDocument",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isDocument((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isVariable(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_isVariable",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isVariable((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_isNull(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlValue_isNull",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNull();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_asNumber(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    double result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_asNumber",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (double)((XmlValue const *)arg1)->asNumber((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyFloat_FromDouble(result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_asString(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    std::string result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_asString",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = ((XmlValue const *)arg1)->asString((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        resultobj = PyString_FromStringAndSize((&result)->data(),(&result)->size());
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_asBoolean(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_asBoolean",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->asBoolean((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_asDocument(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    XmlDocument result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O|O:XmlValue_asDocument",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (obj1) {
        if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = ((XmlValue const *)arg1)->asDocument((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    {
        XmlDocument * resultptr;
        resultptr = new XmlDocument((XmlDocument &) result);
        resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_XmlDocument, 1);
    }
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlValue_equals(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlValue *arg2 = 0 ;
    XmlQueryContext *arg3 = (XmlQueryContext *) 0 ;
    bool result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO|O:XmlValue_equals",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if (obj2) {
        if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->equals((XmlValue const &)*arg2,(XmlQueryContext const *)arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlValue_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlValue, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlIndexSpecification(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *result;
    
    if(!PyArg_ParseTuple(args,(char *)":new_XmlIndexSpecification")) goto fail;
    {
        try {
            result = (XmlIndexSpecification *)new XmlIndexSpecification();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlIndexSpecification, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlIndexSpecification(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlIndexSpecification",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexSpecification_addIndex(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOO:XmlIndexSpecification_addIndex",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->addIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexSpecification_deleteIndex(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOO:XmlIndexSpecification_deleteIndex",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->deleteIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexSpecification_replaceIndex(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOOO:XmlIndexSpecification_replaceIndex",&obj0,&obj1,&obj2,&obj3)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->replaceIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexSpecification_reset(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlIndexSpecification_reset",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            (arg1)->reset();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexSpecification_find(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    XmlIndexDeclaration *result;
    std::string temp2 ;
    std::string temp3 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OOO:XmlIndexSpecification_find",&obj0,&obj1,&obj2)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj2)) {
            temp3.assign(PyString_AsString(obj2));
            arg3 = &temp3;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            result = (XmlIndexDeclaration *)XmlIndexSpecification_find(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlIndexDeclaration, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexSpecification_next(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    XmlIndexDeclaration *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlIndexSpecification_next",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (XmlIndexDeclaration *)XmlIndexSpecification_next(arg1);
            
            if (!result) {
                PyErr_SetString(PyExc_StopIteration, "End of results.");
                return NULL;
            }
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlIndexDeclaration, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlIndexSpecification_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlIndexSpecification, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_delete_XmlIndexDeclaration(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlIndexDeclaration",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexDeclaration_get_uri(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlIndexDeclaration_get_uri",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (char *)XmlIndexDeclaration_get_uri((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexDeclaration_get_name(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlIndexDeclaration_get_name",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (char *)XmlIndexDeclaration_get_name((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlIndexDeclaration_get_index(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlIndexDeclaration_get_index",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (char *)XmlIndexDeclaration_get_index((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlIndexDeclaration(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlIndexDeclaration *result;
    
    if(!PyArg_ParseTuple(args,(char *)":new_XmlIndexDeclaration")) goto fail;
    {
        try {
            result = (XmlIndexDeclaration *)new XmlIndexDeclaration();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlIndexDeclaration, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlIndexDeclaration_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlIndexDeclaration, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlQueryExpression(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlContainer *arg1 = 0 ;
    XmlQueryContext *arg2 = 0 ;
    XmlQueryExpression *result;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:new_XmlQueryExpression",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg1 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg2 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        try {
            result = (XmlQueryExpression *)new XmlQueryExpression(*arg1,*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlQueryExpression, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_delete_XmlQueryExpression(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlQueryExpression",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryExpression_getQueryContext(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    XmlQueryContext *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryExpression_getQueryContext",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            {
                XmlQueryContext &_result_ref = ((XmlQueryExpression const *)arg1)->getQueryContext();
                result = (XmlQueryContext *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlQueryContext, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryExpression_getContainer(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    XmlContainer *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryExpression_getContainer",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            {
                XmlContainer const &_result_ref = ((XmlQueryExpression const *)arg1)->getContainer();
                result = (XmlContainer *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlContainer, 0);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlQueryExpression_getXPathQuery(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    char *result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlQueryExpression_getXPathQuery",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (char *)XmlQueryExpression_getXPathQuery((XmlQueryExpression const *)arg1);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlQueryExpression_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlQueryExpression, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyObject *_wrap_new_XmlModify__SWIG_0(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    std::string *arg1 = 0 ;
    int arg2 ;
    int arg3 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    int32_t arg6 = (int32_t) -1 ;
    XmlQueryContext *arg7 = (XmlQueryContext *) NULL ;
    XmlModify *result;
    std::string temp1 ;
    std::string temp4 ;
    std::string temp5 ;
    PyObject * obj0 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    PyObject * obj6 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OiiOO|iO:new_XmlModify",&obj0,&arg2,&arg3,&obj3,&obj4,&arg6,&obj6)) goto fail;
    {
        if (PyString_Check(obj0)) {
            temp1.assign(PyString_AsString(obj0));
            arg1 = &temp1;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj4)) {
            temp5.assign(PyString_AsString(obj4));
            arg5 = &temp5;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    if (obj6) {
        if ((SWIG_ConvertPtr(obj6,(void **) &arg7, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    }
    {
        try {
            result = (XmlModify *)new XmlModify((std::string const &)*arg1,(XmlModify::ModificationType )arg2,(XmlModify::XmlObject )arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlModify, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlModify__SWIG_1(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlQueryExpression *arg1 = 0 ;
    int arg2 ;
    int arg3 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    int32_t arg6 = (int32_t) -1 ;
    XmlModify *result;
    std::string temp4 ;
    std::string temp5 ;
    PyObject * obj0 = 0 ;
    PyObject * obj3 = 0 ;
    PyObject * obj4 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OiiOO|i:new_XmlModify",&obj0,&arg2,&arg3,&obj3,&obj4,&arg6)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    if (arg1 == NULL) {
        PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
    }
    {
        if (PyString_Check(obj3)) {
            temp4.assign(PyString_AsString(obj3));
            arg4 = &temp4;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        if (PyString_Check(obj4)) {
            temp5.assign(PyString_AsString(obj4));
            arg5 = &temp5;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            result = (XmlModify *)new XmlModify(*arg1,(XmlModify::ModificationType )arg2,(XmlModify::XmlObject )arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_XmlModify, 1);
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_new_XmlModify(PyObject *self, PyObject *args) {
    int argc;
    PyObject *argv[8];
    int ii;
    
    argc = PyObject_Length(args);
    for (ii = 0; (ii < argc) && (ii < 7); ii++) {
        argv[ii] = PyTuple_GetItem(args,ii);
    }
    if ((argc >= 5) && (argc <= 6)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_XmlQueryExpression, 0) == -1) {
                _v = 0;
                PyErr_Clear();
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
            }
            if (_v) {
                {
                    _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0;
                }
                if (_v) {
                    {
                        _v = PyString_Check(argv[3]) ? 1 : 0;
                    }
                    if (_v) {
                        {
                            _v = PyString_Check(argv[4]) ? 1 : 0;
                        }
                        if (_v) {
                            if (argc <= 5) {
                                return _wrap_new_XmlModify__SWIG_1(self,args);
                            }
                            {
                                _v = (PyInt_Check(argv[5]) || PyLong_Check(argv[5])) ? 1 : 0;
                            }
                            if (_v) {
                                return _wrap_new_XmlModify__SWIG_1(self,args);
                            }
                        }
                    }
                }
            }
        }
    }
    if ((argc >= 5) && (argc <= 7)) {
        int _v;
        {
            _v = PyString_Check(argv[0]) ? 1 : 0;
        }
        if (_v) {
            {
                _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
            }
            if (_v) {
                {
                    _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0;
                }
                if (_v) {
                    {
                        _v = PyString_Check(argv[3]) ? 1 : 0;
                    }
                    if (_v) {
                        {
                            _v = PyString_Check(argv[4]) ? 1 : 0;
                        }
                        if (_v) {
                            if (argc <= 5) {
                                return _wrap_new_XmlModify__SWIG_0(self,args);
                            }
                            {
                                _v = (PyInt_Check(argv[5]) || PyLong_Check(argv[5])) ? 1 : 0;
                            }
                            if (_v) {
                                if (argc <= 6) {
                                    return _wrap_new_XmlModify__SWIG_0(self,args);
                                }
                                {
                                    void *ptr;
                                    if (SWIG_ConvertPtr(argv[6], (void **) &ptr, SWIGTYPE_p_XmlQueryContext, 0) == -1) {
                                        _v = 0;
                                        PyErr_Clear();
                                    }else {
                                        _v = 1;
                                    }
                                }
                                if (_v) {
                                    return _wrap_new_XmlModify__SWIG_0(self,args);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_XmlModify'");
    return NULL;
}


static PyObject *_wrap_delete_XmlModify(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlModify *arg1 = (XmlModify *) 0 ;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:delete_XmlModify",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlModify_setNewEncoding(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlModify *arg1 = (XmlModify *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"OO:XmlModify_setNewEncoding",&obj0,&obj1)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        if (PyString_Check(obj1)) {
            temp2.assign(PyString_AsString(obj1));
            arg2 = &temp2;
        }else {
            SWIG_exception(SWIG_TypeError, "string expected");
        }
    }
    {
        try {
            (arg1)->setNewEncoding((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


static PyObject *_wrap_XmlModify_getNumModifications(PyObject *self, PyObject *args) {
    PyObject *resultobj;
    XmlModify *arg1 = (XmlModify *) 0 ;
    int result;
    PyObject * obj0 = 0 ;
    
    if(!PyArg_ParseTuple(args,(char *)"O:XmlModify_getNumModifications",&obj0)) goto fail;
    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
    {
        try {
            result = (int)(arg1)->getNumModifications();
            
        }catch (XmlException &e) {
            PyErr_SetString(PyExc_RuntimeError, e.what());
            return NULL;
        }
    }
    resultobj = PyInt_FromLong((long)result);
    return resultobj;
    fail:
    return NULL;
}


static PyObject * XmlModify_swigregister(PyObject *self, PyObject *args) {
    PyObject *obj;
    if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
    SWIG_TypeClientData(SWIGTYPE_p_XmlModify, obj);
    Py_INCREF(obj);
    return Py_BuildValue((char *)"");
}
static PyMethodDef SwigMethods[] = {
	 { (char *)"new_XmlContainer", _wrap_new_XmlContainer, METH_VARARGS },
	 { (char *)"delete_XmlContainer", _wrap_delete_XmlContainer, METH_VARARGS },
	 { (char *)"XmlContainer_setPageSize", _wrap_XmlContainer_setPageSize, METH_VARARGS },
	 { (char *)"XmlContainer_open", _wrap_XmlContainer_open, METH_VARARGS },
	 { (char *)"XmlContainer_exists", _wrap_XmlContainer_exists, METH_VARARGS },
	 { (char *)"XmlContainer_isOpen", _wrap_XmlContainer_isOpen, METH_VARARGS },
	 { (char *)"XmlContainer_close", _wrap_XmlContainer_close, METH_VARARGS },
	 { (char *)"XmlContainer_setIndexSpecification", _wrap_XmlContainer_setIndexSpecification, METH_VARARGS },
	 { (char *)"XmlContainer_addIndex", _wrap_XmlContainer_addIndex, METH_VARARGS },
	 { (char *)"XmlContainer_deleteIndex", _wrap_XmlContainer_deleteIndex, METH_VARARGS },
	 { (char *)"XmlContainer_replaceIndex", _wrap_XmlContainer_replaceIndex, METH_VARARGS },
	 { (char *)"XmlContainer_upgrade", _wrap_XmlContainer_upgrade, METH_VARARGS },
	 { (char *)"XmlContainer_getIndexSpecification", _wrap_XmlContainer_getIndexSpecification, METH_VARARGS },
	 { (char *)"XmlContainer_getName", _wrap_XmlContainer_getName, METH_VARARGS },
	 { (char *)"XmlContainer_setName", _wrap_XmlContainer_setName, METH_VARARGS },
	 { (char *)"XmlContainer_putDocument", _wrap_XmlContainer_putDocument, METH_VARARGS },
	 { (char *)"XmlContainer_updateDocument", _wrap_XmlContainer_updateDocument, METH_VARARGS },
	 { (char *)"XmlContainer_remove", _wrap_XmlContainer_remove, METH_VARARGS },
	 { (char *)"XmlContainer_rename", _wrap_XmlContainer_rename, METH_VARARGS },
	 { (char *)"XmlContainer_deleteDocument", _wrap_XmlContainer_deleteDocument, METH_VARARGS },
	 { (char *)"XmlContainer_modifyDocument", _wrap_XmlContainer_modifyDocument, METH_VARARGS },
	 { (char *)"XmlContainer_getDocument", _wrap_XmlContainer_getDocument, METH_VARARGS },
	 { (char *)"XmlContainer_parseXPathExpression", _wrap_XmlContainer_parseXPathExpression, METH_VARARGS },
	 { (char *)"XmlContainer_queryWithXPath", _wrap_XmlContainer_queryWithXPath, METH_VARARGS },
	 { (char *)"XmlContainer_query", _wrap_XmlContainer_query, METH_VARARGS },
	 { (char *)"XmlContainer_dump", _wrap_XmlContainer_dump, METH_VARARGS },
	 { (char *)"XmlContainer_load", _wrap_XmlContainer_load, METH_VARARGS },
	 { (char *)"XmlContainer_verify", _wrap_XmlContainer_verify, METH_VARARGS },
	 { (char *)"XmlContainer_setLogLevel", _wrap_XmlContainer_setLogLevel, METH_VARARGS },
	 { (char *)"XmlContainer_setLogCategory", _wrap_XmlContainer_setLogCategory, METH_VARARGS },
	 { (char *)"XmlContainer_get_version_major", _wrap_XmlContainer_get_version_major, METH_VARARGS },
	 { (char *)"XmlContainer_get_version_minor", _wrap_XmlContainer_get_version_minor, METH_VARARGS },
	 { (char *)"XmlContainer_get_version_patch", _wrap_XmlContainer_get_version_patch, METH_VARARGS },
	 { (char *)"XmlContainer_get_version_string", _wrap_XmlContainer_get_version_string, METH_VARARGS },
	 { (char *)"XmlContainer_swigregister", XmlContainer_swigregister, METH_VARARGS },
	 { (char *)"new_XmlDocument", _wrap_new_XmlDocument, METH_VARARGS },
	 { (char *)"delete_XmlDocument", _wrap_delete_XmlDocument, METH_VARARGS },
	 { (char *)"XmlDocument_getID", _wrap_XmlDocument_getID, METH_VARARGS },
	 { (char *)"XmlDocument_setName", _wrap_XmlDocument_setName, METH_VARARGS },
	 { (char *)"XmlDocument_getName", _wrap_XmlDocument_getName, METH_VARARGS },
	 { (char *)"XmlDocument_setContent", _wrap_XmlDocument_setContent, METH_VARARGS },
	 { (char *)"XmlDocument_getContent", _wrap_XmlDocument_getContent, METH_VARARGS },
	 { (char *)"XmlDocument_modifyDocument", _wrap_XmlDocument_modifyDocument, METH_VARARGS },
	 { (char *)"XmlDocument_getContentAsString", _wrap_XmlDocument_getContentAsString, METH_VARARGS },
	 { (char *)"XmlDocument_setMetaData", _wrap_XmlDocument_setMetaData, METH_VARARGS },
	 { (char *)"XmlDocument_getMetaData", _wrap_XmlDocument_getMetaData, METH_VARARGS },
	 { (char *)"XmlDocument_queryWithXPath", _wrap_XmlDocument_queryWithXPath, METH_VARARGS },
	 { (char *)"XmlDocument_swigregister", XmlDocument_swigregister, METH_VARARGS },
	 { (char *)"new_XmlQueryContext", _wrap_new_XmlQueryContext, METH_VARARGS },
	 { (char *)"delete_XmlQueryContext", _wrap_delete_XmlQueryContext, METH_VARARGS },
	 { (char *)"XmlQueryContext_setNamespace", _wrap_XmlQueryContext_setNamespace, METH_VARARGS },
	 { (char *)"XmlQueryContext_getNamespace", _wrap_XmlQueryContext_getNamespace, METH_VARARGS },
	 { (char *)"XmlQueryContext_removeNamespace", _wrap_XmlQueryContext_removeNamespace, METH_VARARGS },
	 { (char *)"XmlQueryContext_clearNamespaces", _wrap_XmlQueryContext_clearNamespaces, METH_VARARGS },
	 { (char *)"XmlQueryContext_setVariableValue", _wrap_XmlQueryContext_setVariableValue, METH_VARARGS },
	 { (char *)"XmlQueryContext_setReturnType", _wrap_XmlQueryContext_setReturnType, METH_VARARGS },
	 { (char *)"XmlQueryContext_getReturnType", _wrap_XmlQueryContext_getReturnType, METH_VARARGS },
	 { (char *)"XmlQueryContext_setEvaluationType", _wrap_XmlQueryContext_setEvaluationType, METH_VARARGS },
	 { (char *)"XmlQueryContext_getEvaluationType", _wrap_XmlQueryContext_getEvaluationType, METH_VARARGS },
	 { (char *)"XmlQueryContext_setWithMetaData", _wrap_XmlQueryContext_setWithMetaData, METH_VARARGS },
	 { (char *)"XmlQueryContext_getWithMetaData", _wrap_XmlQueryContext_getWithMetaData, METH_VARARGS },
	 { (char *)"XmlQueryContext_getVariableValue", _wrap_XmlQueryContext_getVariableValue, METH_VARARGS },
	 { (char *)"XmlQueryContext_swigregister", XmlQueryContext_swigregister, METH_VARARGS },
	 { (char *)"new_XmlResults", _wrap_new_XmlResults, METH_VARARGS },
	 { (char *)"delete_XmlResults", _wrap_delete_XmlResults, METH_VARARGS },
	 { (char *)"XmlResults_next", _wrap_XmlResults_next, METH_VARARGS },
	 { (char *)"XmlResults_nextDocument", _wrap_XmlResults_nextDocument, METH_VARARGS },
	 { (char *)"XmlResults_nextDocumentAndValue", _wrap_XmlResults_nextDocumentAndValue, METH_VARARGS },
	 { (char *)"XmlResults_reset", _wrap_XmlResults_reset, METH_VARARGS },
	 { (char *)"XmlResults_size", _wrap_XmlResults_size, METH_VARARGS },
	 { (char *)"XmlResults_add", _wrap_XmlResults_add, METH_VARARGS },
	 { (char *)"XmlResults_swigregister", XmlResults_swigregister, METH_VARARGS },
	 { (char *)"new_XmlUpdateContext", _wrap_new_XmlUpdateContext, METH_VARARGS },
	 { (char *)"delete_XmlUpdateContext", _wrap_delete_XmlUpdateContext, METH_VARARGS },
	 { (char *)"XmlUpdateContext_swigregister", XmlUpdateContext_swigregister, METH_VARARGS },
	 { (char *)"new_XmlValue", _wrap_new_XmlValue, METH_VARARGS },
	 { (char *)"delete_XmlValue", _wrap_delete_XmlValue, METH_VARARGS },
	 { (char *)"XmlValue_getType", _wrap_XmlValue_getType, METH_VARARGS },
	 { (char *)"XmlValue_isNumber", _wrap_XmlValue_isNumber, METH_VARARGS },
	 { (char *)"XmlValue_isString", _wrap_XmlValue_isString, METH_VARARGS },
	 { (char *)"XmlValue_isBoolean", _wrap_XmlValue_isBoolean, METH_VARARGS },
	 { (char *)"XmlValue_isNode", _wrap_XmlValue_isNode, METH_VARARGS },
	 { (char *)"XmlValue_isDocument", _wrap_XmlValue_isDocument, METH_VARARGS },
	 { (char *)"XmlValue_isVariable", _wrap_XmlValue_isVariable, METH_VARARGS },
	 { (char *)"XmlValue_isNull", _wrap_XmlValue_isNull, METH_VARARGS },
	 { (char *)"XmlValue_asNumber", _wrap_XmlValue_asNumber, METH_VARARGS },
	 { (char *)"XmlValue_asString", _wrap_XmlValue_asString, METH_VARARGS },
	 { (char *)"XmlValue_asBoolean", _wrap_XmlValue_asBoolean, METH_VARARGS },
	 { (char *)"XmlValue_asDocument", _wrap_XmlValue_asDocument, METH_VARARGS },
	 { (char *)"XmlValue_equals", _wrap_XmlValue_equals, METH_VARARGS },
	 { (char *)"XmlValue_swigregister", XmlValue_swigregister, METH_VARARGS },
	 { (char *)"new_XmlIndexSpecification", _wrap_new_XmlIndexSpecification, METH_VARARGS },
	 { (char *)"delete_XmlIndexSpecification", _wrap_delete_XmlIndexSpecification, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_addIndex", _wrap_XmlIndexSpecification_addIndex, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_deleteIndex", _wrap_XmlIndexSpecification_deleteIndex, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_replaceIndex", _wrap_XmlIndexSpecification_replaceIndex, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_reset", _wrap_XmlIndexSpecification_reset, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_find", _wrap_XmlIndexSpecification_find, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_next", _wrap_XmlIndexSpecification_next, METH_VARARGS },
	 { (char *)"XmlIndexSpecification_swigregister", XmlIndexSpecification_swigregister, METH_VARARGS },
	 { (char *)"delete_XmlIndexDeclaration", _wrap_delete_XmlIndexDeclaration, METH_VARARGS },
	 { (char *)"XmlIndexDeclaration_get_uri", _wrap_XmlIndexDeclaration_get_uri, METH_VARARGS },
	 { (char *)"XmlIndexDeclaration_get_name", _wrap_XmlIndexDeclaration_get_name, METH_VARARGS },
	 { (char *)"XmlIndexDeclaration_get_index", _wrap_XmlIndexDeclaration_get_index, METH_VARARGS },
	 { (char *)"new_XmlIndexDeclaration", _wrap_new_XmlIndexDeclaration, METH_VARARGS },
	 { (char *)"XmlIndexDeclaration_swigregister", XmlIndexDeclaration_swigregister, METH_VARARGS },
	 { (char *)"new_XmlQueryExpression", _wrap_new_XmlQueryExpression, METH_VARARGS },
	 { (char *)"delete_XmlQueryExpression", _wrap_delete_XmlQueryExpression, METH_VARARGS },
	 { (char *)"XmlQueryExpression_getQueryContext", _wrap_XmlQueryExpression_getQueryContext, METH_VARARGS },
	 { (char *)"XmlQueryExpression_getContainer", _wrap_XmlQueryExpression_getContainer, METH_VARARGS },
	 { (char *)"XmlQueryExpression_getXPathQuery", _wrap_XmlQueryExpression_getXPathQuery, METH_VARARGS },
	 { (char *)"XmlQueryExpression_swigregister", XmlQueryExpression_swigregister, METH_VARARGS },
	 { (char *)"new_XmlModify", _wrap_new_XmlModify, METH_VARARGS },
	 { (char *)"delete_XmlModify", _wrap_delete_XmlModify, METH_VARARGS },
	 { (char *)"XmlModify_setNewEncoding", _wrap_XmlModify_setNewEncoding, METH_VARARGS },
	 { (char *)"XmlModify_getNumModifications", _wrap_XmlModify_getNumModifications, METH_VARARGS },
	 { (char *)"XmlModify_swigregister", XmlModify_swigregister, METH_VARARGS },
	 { NULL, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static swig_type_info _swigt__p_XmlIndexSpecification[] = {{"_p_XmlIndexSpecification", 0, "XmlIndexSpecification *", 0, 0, 0, 0},{"_p_XmlIndexSpecification", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlModify[] = {{"_p_XmlModify", 0, "XmlModify *", 0, 0, 0, 0},{"_p_XmlModify", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_DbEnv[] = {{"_p_DbEnv", 0, "DbEnv *", 0, 0, 0, 0},{"_p_DbEnv", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlIndexDeclaration[] = {{"_p_XmlIndexDeclaration", 0, "XmlIndexDeclaration *", 0, 0, 0, 0},{"_p_XmlIndexDeclaration", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_Dbt[] = {{"_p_Dbt", 0, "Dbt *", 0, 0, 0, 0},{"_p_Dbt", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlDocument[] = {{"_p_XmlDocument", 0, "XmlDocument *", 0, 0, 0, 0},{"_p_XmlDocument", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlResults[] = {{"_p_XmlResults", 0, "XmlResults *", 0, 0, 0, 0},{"_p_XmlResults", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlValue[] = {{"_p_XmlValue", 0, "XmlValue *", 0, 0, 0, 0},{"_p_XmlValue", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlContainer[] = {{"_p_XmlContainer", 0, "XmlContainer *", 0, 0, 0, 0},{"_p_XmlContainer", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlUpdateContext[] = {{"_p_XmlUpdateContext", 0, "XmlUpdateContext *", 0, 0, 0, 0},{"_p_XmlUpdateContext", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlQueryContext[] = {{"_p_XmlQueryContext", 0, "XmlQueryContext *", 0, 0, 0, 0},{"_p_XmlQueryContext", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_u_int32_t[] = {{"_p_u_int32_t", 0, "u_int32_t *", 0, 0, 0, 0},{"_p_u_int32_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlQueryExpression[] = {{"_p_XmlQueryExpression", 0, "XmlQueryExpression *", 0, 0, 0, 0},{"_p_XmlQueryExpression", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};

static swig_type_info *swig_types_initial[] = {
_swigt__p_XmlIndexSpecification, 
_swigt__p_XmlModify, 
_swigt__p_DbEnv, 
_swigt__p_XmlIndexDeclaration, 
_swigt__p_Dbt, 
_swigt__p_XmlDocument, 
_swigt__p_XmlResults, 
_swigt__p_XmlValue, 
_swigt__p_XmlContainer, 
_swigt__p_XmlUpdateContext, 
_swigt__p_XmlQueryContext, 
_swigt__p_u_int32_t, 
_swigt__p_XmlQueryExpression, 
0
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{ SWIG_PY_INT,     (char *)"DB_AUTO_COMMIT", (long) DB_AUTO_COMMIT, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"DB_CREATE", (long) DB_CREATE, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"DB_DIRTY_READ", (long) DB_DIRTY_READ, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"DB_EXCL", (long) DB_EXCL, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"DB_NOMMAP", (long) DB_NOMMAP, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"DB_RDONLY", (long) DB_RDONLY, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"DB_THREAD", (long) DB_THREAD, 0, 0, 0},
{ SWIG_PY_STRING,  (char*)"metaDataNamespace_uri", 0, 0, (void *)"DbXml::metaDataNamespace_uri", 0},
{ SWIG_PY_STRING,  (char*)"metaDataNamespace_prefix", 0, 0, (void *)"DbXml::metaDataNamespace_prefix", 0},
{ SWIG_PY_STRING,  (char*)"metaDataName_id", 0, 0, (void *)"DbXml::metaDataName_id", 0},
{ SWIG_PY_STRING,  (char*)"metaDataName_name", 0, 0, (void *)"DbXml::metaDataName_name", 0},
{ SWIG_PY_STRING,  (char*)"metaDataName_content", 0, 0, (void *)"DbXml::metaDataName_content", 0},
{ SWIG_PY_STRING,  (char*)"metaDataName_default", 0, 0, (void *)"DbXml::metaDataName_default", 0},
{ SWIG_PY_STRING,  (char*)"metaDataNamespace_prefix_debug", 0, 0, (void *)"DbXml::metaDataNamespace_prefix_debug", 0},
{ SWIG_PY_INT,     (char *)"LEVEL_NONE", (long) LEVEL_NONE, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"LEVEL_DEBUG", (long) LEVEL_DEBUG, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"LEVEL_INFO", (long) LEVEL_INFO, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"LEVEL_WARNING", (long) LEVEL_WARNING, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"LEVEL_ERROR", (long) LEVEL_ERROR, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"LEVEL_ALL", (long) LEVEL_ALL, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_NONE", (long) CATEGORY_NONE, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_INDEXER", (long) CATEGORY_INDEXER, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_QUERY", (long) CATEGORY_QUERY, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_OPTIMIZER", (long) CATEGORY_OPTIMIZER, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_DICTIONARY", (long) CATEGORY_DICTIONARY, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_CONTAINER", (long) CATEGORY_CONTAINER, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"CATEGORY_ALL", (long) CATEGORY_ALL, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlQueryContext_ResultDocuments", (long) XmlQueryContext::ResultDocuments, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlQueryContext_ResultValues", (long) XmlQueryContext::ResultValues, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlQueryContext_CandidateDocuments", (long) XmlQueryContext::CandidateDocuments, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlQueryContext_ResultDocumentsAndValues", (long) XmlQueryContext::ResultDocumentsAndValues, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlQueryContext_Eager", (long) XmlQueryContext::Eager, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlQueryContext_Lazy", (long) XmlQueryContext::Lazy, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_NONE", (long) XmlValue::NONE, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_STRING", (long) XmlValue::STRING, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_NUMBER", (long) XmlValue::NUMBER, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_BOOLEAN", (long) XmlValue::BOOLEAN, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_DOCUMENT", (long) XmlValue::DOCUMENT, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_NODE", (long) XmlValue::NODE, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_VARIABLE", (long) XmlValue::VARIABLE, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlValue_BINARY", (long) XmlValue::BINARY, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_InsertAfter", (long) XmlModify::InsertAfter, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_InsertBefore", (long) XmlModify::InsertBefore, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Append", (long) XmlModify::Append, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Update", (long) XmlModify::Update, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Remove", (long) XmlModify::Remove, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Rename", (long) XmlModify::Rename, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Element", (long) XmlModify::Element, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Attribute", (long) XmlModify::Attribute, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Text", (long) XmlModify::Text, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_ProcessingInstruction", (long) XmlModify::ProcessingInstruction, 0, 0, 0},
{ SWIG_PY_INT,     (char *)"XmlModify_Comment", (long) XmlModify::Comment, 0, 0, 0},
{0}};

#ifdef __cplusplus
}
#endif

#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) SWIG_init(void) {
    static PyObject *SWIG_globals = 0; 
    static int       typeinit = 0;
    PyObject *m, *d;
    int       i;
    if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
    m = Py_InitModule((char *) SWIG_name, SwigMethods);
    d = PyModule_GetDict(m);
    
    if (!typeinit) {
        for (i = 0; swig_types_initial[i]; i++) {
            swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
        }
        typeinit = 1;
    }
    SWIG_InstallConstants(d,swig_const_table);
    
}

