/* ----------------------------------------------------------------------------
 * 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. 
 * ----------------------------------------------------------------------------- */


#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

/***********************************************************************
 * 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

/*
 * $Header: /a/CVSROOT/xml/src/tcl/dbxml_tcl_wrap.cpp,v 1.73 2004/01/27 01:34:35 gmf Exp $
 * 
 * swigtcl8.swg
 */

#include <tcl.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>

#ifdef __cplusplus
extern "C" {
#endif

/* Constant table */

#define SWIG_TCL_INT     1
#define SWIG_TCL_FLOAT   2
#define SWIG_TCL_STRING  3
#define SWIG_TCL_POINTER 4
#define SWIG_TCL_BINARY  5

/* Flags for pointer conversion */
#define SWIG_POINTER_EXCEPTION     0x1
#define SWIG_POINTER_DISOWN        0x2

/* Swig fail macro */

#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;

typedef int   (*swig_wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
typedef int   (*swig_wrapper_func)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
typedef char *(*swig_variable_func)(ClientData, Tcl_Interp *, char *, char *, int);
typedef void  (*swig_delete_func)(ClientData);

typedef struct swig_method { 
  const char     *name;
  swig_wrapper   method;
} swig_method;

typedef struct swig_attribute {
  const char     *name;
  swig_wrapper   getmethod;
  swig_wrapper   setmethod;
} swig_attribute;
  
typedef struct swig_class {
  const char         *name;
  swig_type_info   **type;
  swig_wrapper       constructor;
  void              (*destructor)(void *);
  swig_method        *methods;
  swig_attribute     *attributes;
  struct swig_class **bases;
} swig_class;

typedef struct swig_instance {
  Tcl_Obj       *thisptr;
  void          *thisvalue;
  swig_class   *classptr;
  int            destroy;
  Tcl_Command    cmdtok;
} swig_instance;

#ifdef SWIG_NOINCLUDE
SWIGEXPORT(char *)    SWIG_PackData(char *c, void *ptr, int sz);
SWIGEXPORT(char *)    SWIG_UnpackData(char *c, void *ptr, int sz);
SWIGEXPORT(int)       SWIG_ConvertPtrFromString(Tcl_Interp *, char *, void **, swig_type_info *,int flags);
SWIGEXPORT(int)       SWIG_ConvertPtr(Tcl_Interp *, Tcl_Obj *, void **, swig_type_info *, int flags);
SWIGEXPORT(int)       SWIG_ConvertPacked(Tcl_Interp *, Tcl_Obj *, void *, int sz, swig_type_info *, int flags);
SWIGEXPORT(void)      SWIG_MakePtr(char *, void *, swig_type_info *, int flags);
SWIGEXPORT(Tcl_Obj *) SWIG_NewPointerObj(void *, swig_type_info *, int flags);
SWIGEXPORT(Tcl_Obj *) SWIG_NewPackedObj(void *, int sz, swig_type_info *, int flags);
SWIGEXPORT(int)       SWIG_GetArgs(Tcl_Interp *, int, Tcl_Obj *CONST [], const char *, ...);
SWIGEXPORT(char *)    SWIG_PointerTypeFromString(char *c);
SWIGEXPORT(void)      SWIG_Acquire(void *ptr);
SWIGEXPORT(int)       SWIG_Disown(void *ptr);
SWIGEXPORT(int)       SWIG_Thisown(void *ptr);
SWIGEXPORT(void)      SWIG_InstallConstants(Tcl_Interp *interp, struct swig_const_info constants[]);
SWIGEXPORT(Tcl_Obj *) SWIG_GetConstant(const char *key);
SWIGEXPORT(Tcl_Obj *) SWIG_NewInstanceObj(Tcl_Interp *interp, void *, swig_type_info *, int flags);
SWIGEXPORT(int)       SWIG_ObjectConstructor(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
SWIGEXPORT(int)       SWIG_MethodCommand(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
SWIGEXPORT(void)      SWIG_ObjectDelete(ClientData);
#else

/* Object support */
static Tcl_HashTable  swigobjectTable;
static int            swigobjectTableinit = 0;

/* Acquire ownership of a pointer */
SWIGRUNTIME(void)
SWIG_Acquire(void *ptr)
{
  Tcl_HashEntry *entryPtr;
  int newobj;
  if (!swigobjectTableinit) {
    Tcl_InitHashTable(&swigobjectTable, TCL_ONE_WORD_KEYS);
    swigobjectTableinit = 1;
  }
  entryPtr = Tcl_CreateHashEntry(&swigobjectTable, (char *) ptr, &newobj);
}

/* Disown a pointer.  Returns 1 if we owned it to begin with */
SWIGRUNTIME(int)
SWIG_Disown(void *ptr)
{
  Tcl_HashEntry *entryPtr;
  if (!swigobjectTableinit) return 0;
  entryPtr = Tcl_FindHashEntry(&swigobjectTable, (char *) ptr);
  if (entryPtr) {
    Tcl_DeleteHashEntry(entryPtr);
    return 1;
  } 
  return 0;
}

SWIGRUNTIME(int)
SWIG_Thisown(void *ptr) {
  if (!swigobjectTableinit) return 0;
  if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) {
    return 1;
  }
  return 0;
}

/* 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;
  if ((int)strlen(c) < (2*sz)) return c;
  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_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type_info *ty, int flags)
{
  swig_type_info *tc;
  /* Pointer values must start with leading underscore */
  while (*c != '_') {
    *ptr = (void *) 0;
    if (strcmp(c,"NULL") == 0) return TCL_OK;
    /* Hmmm. It could be an object name. */
    if (Tcl_VarEval(interp,c," cget -this", (char *) NULL) == TCL_OK) {
      Tcl_Obj *result = Tcl_GetObjResult(interp);
      c = Tcl_GetStringFromObj(result, NULL);
      continue;
    }
    if (flags & SWIG_POINTER_EXCEPTION) 
      Tcl_SetResult(interp, (char *) "Type error. Expected a pointer", TCL_STATIC);
    return TCL_ERROR;
  }
  c++;
  c = SWIG_UnpackData(c,ptr,sizeof(void *));
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if ((!tc) && (flags & SWIG_POINTER_EXCEPTION)) {
      Tcl_SetResult(interp, (char *) "Type error. Expected ", TCL_STATIC);
      Tcl_AppendElement(interp, (char *) ty->name);
      return TCL_ERROR;
    } else if (!tc) {
      return TCL_ERROR;
    }
    if (flags & SWIG_POINTER_DISOWN) {
      SWIG_Disown((void *) *ptr);
    }
    *ptr = SWIG_TypeCast(tc,(void *) *ptr);
  }
  return TCL_OK;
}

/* Convert a pointer value */
SWIGRUNTIME(int)
SWIG_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags)
{
  return SWIG_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
}

/* Convert a pointer value */
SWIGRUNTIME(char *)
SWIG_PointerTypeFromString(char *c) {
  char d;
  /* Pointer values must start with leading underscore. NULL has no type */
  if (*c != '_') {
    return 0;
  }
  c++;
  /* Extract hex value from pointer */
  while ((d = *c)) {
    if (!(((d >= '0') && (d <= '9')) || ((d >= 'a') && (d <= 'f')))) break;
    c++;
  }
  return c;
}

/* Convert a packed value value */
SWIGRUNTIME(int)
SWIG_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
  swig_type_info *tc;
  char  *c;
  
  if (!obj) goto type_error;
  c = Tcl_GetStringFromObj(obj,NULL);
  /* 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 TCL_OK;

type_error:

  if (flags) {
    if (ty) {
      Tcl_SetResult(interp, (char *) "Type error. Expected ", TCL_STATIC);
      Tcl_AppendElement(interp, (char *) ty->name);
      return TCL_ERROR;
    } else {
      Tcl_SetResult(interp, (char *) "Expected packed data.", TCL_STATIC);
      return TCL_ERROR;
    }
  }
  return TCL_ERROR;
}


/* Take a pointer and convert it to a string */
SWIGRUNTIME(void) 
SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
  if (ptr) {
    *(c++) = '_';
    c = SWIG_PackData(c,&ptr,sizeof(void *));
    strcpy(c,ty->name);
  } else {
    strcpy(c,(char *)"NULL");
  }
  flags = 0;
}

/* Create a new pointer object */
SWIGRUNTIME(Tcl_Obj *)
SWIG_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
  Tcl_Obj *robj;
  char result[512];
  SWIG_MakePtr(result,ptr,type,flags);
  robj = Tcl_NewStringObj(result,-1);
  return robj;
}

SWIGRUNTIME(Tcl_Obj *)
SWIG_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) {
  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);
  flags = 0;
  return Tcl_NewStringObj(result,-1);
}

static Tcl_HashTable   swigconstTable;
static int             swigconstTableinit = 0;

/* Install Constants */
SWIGRUNTIME(void)
SWIG_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
  int i;
  Tcl_Obj *obj;
  Tcl_HashEntry *entryPtr;
  int            newobj;

  if (!swigconstTableinit) {
    Tcl_InitHashTable(&swigconstTable, TCL_STRING_KEYS);
    swigconstTableinit = 1;
  }
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_TCL_INT:
      obj = Tcl_NewIntObj(constants[i].lvalue);
      break;
    case SWIG_TCL_FLOAT:
      obj = Tcl_NewDoubleObj(constants[i].dvalue);
      break;
    case SWIG_TCL_STRING:
      obj = Tcl_NewStringObj((char *) constants[i].pvalue,-1);
      break;
    case SWIG_TCL_POINTER:
      obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
      break;
    case SWIG_TCL_BINARY:
      obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype),0);
      break;
    default:
      obj = 0;
      break;
    }
    if (obj) {
      Tcl_ObjSetVar2(interp,Tcl_NewStringObj(constants[i].name,-1), NULL, obj, TCL_GLOBAL_ONLY);
      entryPtr = Tcl_CreateHashEntry(&swigconstTable, constants[i].name, &newobj);
      Tcl_SetHashValue(entryPtr, (ClientData) obj);
    }
  }
}

SWIGRUNTIME(Tcl_Obj *)
SWIG_GetConstant(const char *key) {
  Tcl_HashEntry *entryPtr;
  if (!swigconstTableinit) return 0;
  entryPtr = Tcl_FindHashEntry(&swigconstTable, key);
  if (entryPtr) {
    return (Tcl_Obj *) Tcl_GetHashValue(entryPtr);
  }
  printf("Searching %s\n", key);
  return 0;
}

/* Get arguments */
SWIGRUNTIME(int)
SWIG_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...)
{
  int        argno = 0, opt = 0, tempi;
  double     tempd;
  const char *c;
  va_list    ap;
  void      *vptr;
  Tcl_Obj   *obj = 0;
  swig_type_info *ty;

  va_start(ap,fmt);
  for (c = fmt; (*c && (*c != ':') && (*c != ';')); c++,argno++) {
    if (*c == '|') {
      opt = 1;
      c++;
    }
    if (argno >= (objc-1)) {
      if (!opt) {
	Tcl_SetResult(interp, (char *) "Wrong # args. ", TCL_STATIC);
	goto argerror;
      } else {
	va_end(ap);
	return TCL_OK;
      }
    }

    vptr = va_arg(ap,void *);
    if (vptr) {
      if (isupper(*c)) {
	obj = SWIG_GetConstant(Tcl_GetStringFromObj(objv[argno+1],0));
	if (!obj) obj = objv[argno+1];
      } else {
	obj = objv[argno+1];
      }
      switch(*c) {
      case 'i': case 'I':
      case 'l': case 'L':
      case 'h': case 'H':
      case 'b': case 'B':
	if (Tcl_GetIntFromObj(interp,obj,&tempi) != TCL_OK) goto argerror;
	if ((*c == 'i') || (*c == 'I')) *((int *)vptr) = tempi;
	else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = tempi;
	else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = tempi;
	else if ((*c == 'b') || (*c == 'B')) *((unsigned char *)vptr) = tempi;
	break;
      case 'f': case 'F':
      case 'd': case 'D':
	if (Tcl_GetDoubleFromObj(interp,obj,&tempd) != TCL_OK) goto argerror;
	if ((*c == 'f') || (*c == 'F')) *((float *) vptr) = (float)tempd;
	else if ((*c == 'd') || (*c == 'D')) *((double*) vptr) = tempd;
	break;
      case 's': case 'S':
	if (*(c+1) == '#') {
	  int *vlptr = (int *) va_arg(ap, void *);
	  *((char **) vptr) = Tcl_GetStringFromObj(obj, vlptr);
	  c++;
	} else {
	  *((char **)vptr) = Tcl_GetStringFromObj(obj,NULL);
	}
	break;
      case 'c': case 'C':
	*((char *)vptr) = *(Tcl_GetStringFromObj(obj,NULL));
	break;
      case 'p': case 'P':
	ty = (swig_type_info *) va_arg(ap, void *);
	if (SWIG_ConvertPtr(interp, obj, (void **) vptr, ty, SWIG_POINTER_EXCEPTION) == TCL_ERROR) goto argerror;
	break;
      case 'o': case 'O':
	*((Tcl_Obj **)vptr) = objv[argno+1];
	break;
      default:
	break;
      }
    }
  }
  
  if ((*c != ';') && ((objc-1) > argno)) {
    Tcl_SetResult(interp, (char *) "Wrong # args.", TCL_STATIC);
    goto argerror;
  }
  va_end(ap);
  return TCL_OK;
  
 argerror:
  {
    char temp[32];
    sprintf(temp,"%d", argno+1);
    c = strchr(fmt,':');
    if (!c) c = strchr(fmt,';');
    if (!c) c = (char *)"";
    Tcl_AppendResult(interp,c," argument ", temp, NULL);
    va_end(ap);
    return TCL_ERROR;
  }
}

SWIGRUNTIME(void)
SWIG_ObjectDelete(ClientData clientData) {
  swig_instance *si = (swig_instance *) clientData;
  if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
    if (si->classptr->destructor) {
      (si->classptr->destructor)(si->thisvalue);
    }
  }
  Tcl_DecrRefCount(si->thisptr);
  free(si);
}

/* Function to invoke object methods given an instance */
SWIGRUNTIME(int)
SWIG_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[])
{
  char *method,   *attrname;
  swig_instance   *inst = (swig_instance *) clientData;
  swig_method     *meth;
  swig_attribute  *attr;
  Tcl_Obj         *oldarg;
  Tcl_Obj         **objv;
  int              rcode;
  swig_class      *cls;
  swig_class      *cls_stack[64];
  int              cls_stack_bi[64];
  int              cls_stack_top = 0;
  int              numconf = 2;
  int              bi;

  objv = (Tcl_Obj **) _objv;
  if (objc < 2) {
    Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
    return TCL_ERROR;
  }
  method = Tcl_GetStringFromObj(objv[1],NULL);
  if (strcmp(method,"-acquire") == 0) {
    inst->destroy = 1;
    SWIG_Acquire(inst->thisvalue);
    return TCL_OK;
  } 
  if (strcmp(method,"-disown") == 0) {
    if (inst->destroy) {
      SWIG_Disown(inst->thisvalue);
    }
    inst->destroy = 0;
    return TCL_OK;
  }
  if (strcmp(method,"-delete") == 0) {
    Tcl_DeleteCommandFromToken(interp,inst->cmdtok);
    return TCL_OK;
  }
  cls_stack[cls_stack_top] = inst->classptr;
  cls_stack_bi[cls_stack_top] = -1;
  cls = inst->classptr;
  while (1) {
    bi = cls_stack_bi[cls_stack_top];
    cls = cls_stack[cls_stack_top];
    if (bi != -1) {
      cls = cls->bases[bi];
      if (cls) {
	cls_stack_bi[cls_stack_top]++;
	cls_stack_top++;
	cls_stack[cls_stack_top] = cls;
	cls_stack_bi[cls_stack_top] = -1;
	continue;
      }
    }
    if (!cls) {
      cls_stack_top--;
      if (cls_stack_top < 0) break;
      else continue;
    }
    cls_stack_bi[cls_stack_top]++;

    meth = cls->methods;
    /* Check for methods */
    while (meth && meth->name) {
      if (strcmp(meth->name,method) == 0) {
	oldarg = objv[1];
	objv[1] = inst->thisptr;
	Tcl_IncrRefCount(inst->thisptr);
	rcode = (*meth->method)(clientData,interp,objc,objv);
	objv[1] = oldarg;
	Tcl_DecrRefCount(inst->thisptr);
	return rcode;
      }
      meth++;
    }
    /* Check class methods for a match */
    if (strcmp(method,"cget") == 0) {
      if (objc < 3) {
	Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
	return TCL_ERROR;
      }
      attrname = Tcl_GetStringFromObj(objv[2],NULL);
      attr = cls->attributes;
      while (attr && attr->name) {
	if ((strcmp(attr->name, attrname) == 0) && (attr->getmethod)) {
	  oldarg = objv[1];
	  objv[1] = inst->thisptr;
	  Tcl_IncrRefCount(inst->thisptr);
	  rcode = (*attr->getmethod)(clientData,interp,2, objv);
	  objv[1] = oldarg;
	  Tcl_DecrRefCount(inst->thisptr);
	  return rcode;
	}
	attr++;
      }
      if (strcmp(attrname, "-this") == 0) {
	Tcl_SetObjResult(interp, Tcl_DuplicateObj(inst->thisptr));
	return TCL_OK;
      }
      if (strcmp(attrname, "-thisown") == 0) {
	if (SWIG_Thisown(inst->thisvalue)) {
	  Tcl_SetResult(interp,(char*)"1",TCL_STATIC);
	} else {
	  Tcl_SetResult(interp,(char*)"0",TCL_STATIC);
	}
	return TCL_OK;
      }
    } else if (strcmp(method, "configure") == 0) {
      int i;
      if (objc < 4) {
	Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
	return TCL_ERROR;
      }
      i = 2;
      while (i < objc) {
	attrname = Tcl_GetStringFromObj(objv[i],NULL);
	attr = cls->attributes;
	while (attr && attr->name) {
	  if ((strcmp(attr->name, attrname) == 0) && (attr->setmethod)) {
	    oldarg = objv[i];
	    objv[i] = inst->thisptr;
	    Tcl_IncrRefCount(inst->thisptr);
	    rcode = (*attr->setmethod)(clientData,interp,3, &objv[i-1]);
	    objv[i] = oldarg;
	    Tcl_DecrRefCount(inst->thisptr);
	    if (rcode != TCL_OK) return rcode;
	    numconf += 2;
	  }
	  attr++;
	}
	i+=2;
      }
    }
  }
  if (strcmp(method,"configure") == 0) {
    if (numconf >= objc) {
      return TCL_OK;
    } else {
      Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
      return TCL_ERROR;
    }
  }
  if (strcmp(method,"cget") == 0) {
      Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
      return TCL_ERROR;
  }

  Tcl_SetResult(interp, (char *) "Invalid method. Must be one of: configure cget -acquire -disown -delete", TCL_STATIC);
  cls = inst->classptr;
  bi = 0;
  while (cls) {
    meth = cls->methods;
    while (meth && meth->name) {
      char *cr = (char *) Tcl_GetStringResult(interp);
      if (!strstr(strchr(cr,':'), meth->name))
	Tcl_AppendElement(interp, (char *) meth->name);
      meth++;
    }
    cls = inst->classptr->bases[bi++];
  }
  return TCL_ERROR;
}

/* Function to create objects */
SWIGRUNTIME(int)
SWIG_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
{
    Tcl_Obj          *newObj = 0;
    void             *thisvalue = 0;
    swig_instance   *newinst = 0;
    swig_class      *classptr = (swig_class *) clientData;
    swig_wrapper     cons = 0;
    char             *name = 0;
    int               firstarg = 0;
    int               thisarg = 0;
    int               destroy = 1; 

    if (!classptr) {
      Tcl_SetResult(interp, (char *) "swig: internal runtime error. No class object defined.", TCL_STATIC);
      return TCL_ERROR;
    }
    cons = classptr->constructor;
    if (objc > 1) {
      char *s = Tcl_GetStringFromObj(objv[1],NULL);
      if (strcmp(s,"-this") == 0) {
	thisarg = 2;
	cons = 0;
      } else if (strcmp(s,"-args") == 0) {
	firstarg = 1;
      } else if (objc == 2) {
	firstarg = 1;
	name = s;
      } else if (objc >= 3) {
	char *s1;
	name = s;
	s1 = Tcl_GetStringFromObj(objv[2],NULL);
	if (strcmp(s1,"-this") == 0) {
	  thisarg = 3;
	  cons = 0;
	} else {
	  firstarg = 1;
	}
      }
    }
    if (cons) {
      int result;
      result = (*cons)(0, interp, objc-firstarg, &objv[firstarg]);
      if (result != TCL_OK) {
	return result;
      }
      newObj = Tcl_DuplicateObj(Tcl_GetObjResult(interp));
      if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
    } else if (thisarg > 0) {
      if (thisarg < objc) {
	destroy = 0;
	newObj = Tcl_DuplicateObj(objv[thisarg]);
	if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
      } else {
	Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
	return TCL_ERROR;
      }
    } else {
      Tcl_SetResult(interp, (char *) "No constructor available.", TCL_STATIC);
      return TCL_ERROR;
    }
    if (SWIG_ConvertPtr(interp,newObj, (void **) &thisvalue, *(classptr->type), SWIG_POINTER_EXCEPTION) == TCL_ERROR) {
      Tcl_DecrRefCount(newObj);
      return TCL_ERROR;
    }
    newinst = (swig_instance *) malloc(sizeof(swig_instance));
    newinst->thisptr = newObj;
    Tcl_IncrRefCount(newObj);
    newinst->thisvalue = thisvalue;
    newinst->classptr = classptr;
    newinst->destroy = destroy;
    if (destroy) {
      SWIG_Acquire(thisvalue);
    }
    newinst->cmdtok = Tcl_CreateObjCommand(interp,name, (swig_wrapper) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
    return TCL_OK;
}


/* This function takes the current result and turns it into an object command */
SWIGRUNTIME(Tcl_Obj *)
SWIG_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
  Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
  /* Check to see if this pointer belongs to a class or not */
  if ((type->clientdata) && (interp)) {
    Tcl_CmdInfo    ci;
    char          *name;
    name = Tcl_GetStringFromObj(robj,NULL);
    if (!Tcl_GetCommandInfo(interp,name, &ci) || (flags)) {
      swig_instance *newinst = (swig_instance *) malloc(sizeof(swig_instance));
      newinst->thisptr = Tcl_DuplicateObj(robj);
      Tcl_IncrRefCount(newinst->thisptr);
      newinst->thisvalue = thisvalue;
      newinst->classptr = (swig_class *) type->clientdata;
      newinst->destroy = flags;
      newinst->cmdtok = Tcl_CreateObjCommand(interp, Tcl_GetStringFromObj(robj,NULL), (swig_wrapper_func) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
      if (flags) {
	SWIG_Acquire(thisvalue);
      }
    }
  }
  return robj;
}

#endif

/* Structure for command table */
typedef struct {
  const char *name;
  int       (*wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
  ClientData  clientdata;
} swig_command_info;

/* Structure for variable linking table */
typedef struct {
  const char *name;
  void *addr;
  char * (*get)(ClientData, Tcl_Interp *, char *, char *, int);
  char * (*set)(ClientData, Tcl_Interp *, char *, char *, int);
} swig_var_info;

#ifdef __cplusplus
}
#endif






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

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

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

#define SWIG_init    Dbxml_tcl_Init
#define SWIG_name    "dbxml_tcl"
#define SWIG_prefix  ""
#define SWIG_version "0.0"


#ifdef __cplusplus
extern "C" {
#endif
#ifdef MAC_TCL
#pragma export on
#endif
SWIGEXPORT(int) SWIG_init(Tcl_Interp *);
#ifdef MAC_TCL
#pragma export off
#endif
#ifdef __cplusplus
}
#endif



#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


#define SWIG_exception(a,b)   { Tcl_SetResult(interp,b,TCL_VOLATILE); 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>


extern "C" void *_NameToPtr(const char *);
#define NAME_TO_ENV(name) (DB_ENV *)_NameToPtr((name))
#define NAME_TO_TXN(name) (DB_TXN *)_NameToPtr((name))

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(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(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();
	}
static std::string XmlDocument_getContentAsString(XmlDocument const *self){
		std::string s;
		return self->getContentAsString(s);
	}
static XmlResults *XmlDocument_queryWithXPath(XmlDocument const *self,std::string const &query,XmlQueryContext *context){
		return new XmlResults(self->queryWithXPath(query, context));
	}
static XmlResults *XmlDocument_queryWithXPath(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 std::string const XmlQueryContext_get(XmlQueryContext const *self,char const *name){
		XmlValue value;
		return self->getVariableValue(name, value) ? value.asString(self) : "";
	}
static void XmlQueryContext_set(XmlQueryContext *self,std::string const &name,std::string const &value){
		XmlValue xval(value);
		self->setVariableValue(name, xval);
	}
static void XmlQueryContext_setDebugVariable(XmlQueryContext *self,std::string const &var){
		self->setVariableValue("dbxml:debug", var);
	}
static XmlDocument *XmlValue_asDocument(XmlValue const *self,XmlQueryContext const *context){
		return new XmlDocument(self->asDocument(context));
	}
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 int
_wrap_dbxml_version(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    int *arg1 = (int *) 0 ;
    int *arg2 = (int *) 0 ;
    int *arg3 = (int *) 0 ;
    char *result;
    
    arg1 = NULL; 
    arg2 = NULL; 
    arg3 = NULL; 
    if (SWIG_GetArgs(interp, objc, objv,":dbxml_version ") == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (char *)dbxml_version(arg1,arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewStringObj(result,-1));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_setLogLevel(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    int arg1 ;
    bool arg2 ;
    int tempb2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"io:setLogLevel level enabled ",&arg1,0) == TCL_ERROR) SWIG_fail;
    if (Tcl_GetIntFromObj(interp,objv[2],&tempb2) == TCL_ERROR) SWIG_fail;
    arg2 = tempb2 ? true : false;
    {
        try {
            setLogLevel((LogLevel )arg1,arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_setLogCategory(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    int arg1 ;
    bool arg2 ;
    int tempb2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"io:setLogCategory category enabled ",&arg1,0) == TCL_ERROR) SWIG_fail;
    if (Tcl_GetIntFromObj(interp,objv[2],&tempb2) == TCL_ERROR) SWIG_fail;
    arg2 = tempb2 ? true : false;
    {
        try {
            setLogCategory((LogCategory )arg1,arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlContainer(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    std::string *arg2 = 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    XmlContainer *result;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo|i:new_XmlContainer dbenv name flags ",0,0,&arg3) == TCL_ERROR) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[1], NULL);
        DB_ENV *envp = NAME_TO_ENV(arg);
        arg1 = envp ? DbEnv::wrap_DB_ENV(envp) : NULL;
    }
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            result = (XmlContainer *)new XmlContainer(arg1,(std::string const &)*arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlContainer,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlContainer(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlContainer self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_setPageSize(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oi:XmlContainer_setPageSize self pagesize ",0,&arg2) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->setPageSize(arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_open(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    int arg4 = (int) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo|ii:XmlContainer_open self txn flags mode ",0,0,&arg3,&arg4) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        try {
            (arg1)->open(arg2,arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_exists(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlContainer_exists self txn ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        try {
            result = (bool)(arg1)->exists(arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_isOpen(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlContainer_isOpen self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)((XmlContainer const *)arg1)->isOpen();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_close(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|i:XmlContainer_close self flags ",0,&arg2) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->close(arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_setIndexSpecification(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlIndexSpecification *arg3 = 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo:XmlContainer_setIndexSpecification self txn index ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->setIndexSpecification(arg2,(XmlIndexSpecification const &)*arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_addIndex(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooooo:XmlContainer_addIndex self txn uri name index ",0,0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        temp5 = std::string(Tcl_GetStringFromObj(objv[5],NULL));
        arg5 = &temp5;
    }
    {
        try {
            (arg1)->addIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_deleteIndex(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooooo:XmlContainer_deleteIndex self txn uri name index ",0,0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        temp5 = std::string(Tcl_GetStringFromObj(objv[5],NULL));
        arg5 = &temp5;
    }
    {
        try {
            (arg1)->deleteIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_replaceIndex(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooooo:XmlContainer_replaceIndex self txn uri name index ",0,0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        temp5 = std::string(Tcl_GetStringFromObj(objv[5],NULL));
        arg5 = &temp5;
    }
    {
        try {
            (arg1)->replaceIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_upgrade(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|i:XmlContainer_upgrade self flags ",0,&arg2) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->upgrade(arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_getIndexSpecification(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlIndexSpecification *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlContainer_getIndexSpecification self txn ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        try {
            result = (XmlIndexSpecification *)XmlContainer_getIndexSpecification((XmlContainer const *)arg1,arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlIndexSpecification,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_getName(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    std::string *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlContainer_getName self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            {
                std::string const &_result_ref = ((XmlContainer const *)arg1)->getName();
                result = (std::string *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        Tcl_SetStringObj(Tcl_GetObjResult(interp),(char*)result->c_str(),result->length());
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_setName(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlContainer_setName self name ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->setName((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_putDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|oi:XmlContainer_putDocument self txn document context flags ",0,0,0,0,&arg5) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (u_int32_t)(arg1)->putDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_updateDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|o:XmlContainer_updateDocument self txn document context ",0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            (arg1)->updateDocument(arg2,*arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_remove(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo|i:XmlContainer_remove self txn flags ",0,0,&arg3) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        try {
            (arg1)->remove(arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_rename(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    std::string temp3 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|i:XmlContainer_rename self txn newName flags ",0,0,0,&arg4) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        try {
            (arg1)->rename(arg2,(std::string const &)*arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_deleteDocumentByID(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooi|oi:XmlContainer_deleteDocumentByID self txn id context flags ",0,0,&arg3,0,&arg5) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            (arg1)->deleteDocument(arg2,arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_deleteDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|oi:XmlContainer_deleteDocument self txn document context flags ",0,0,0,0,&arg5) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            (arg1)->deleteDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_modifyDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlModify *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|oi:XmlContainer_modifyDocument self txn modify context flags ",0,0,0,0,&arg5) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            (arg1)->modifyDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_getDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    XmlDocument *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooi|i:XmlContainer_getDocument self txn id flags ",0,0,&arg3,&arg4) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        try {
            result = (XmlDocument *)XmlContainer_getDocument(arg1,arg2,arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlDocument,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_parseXPathExpression(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    XmlQueryExpression *result;
    std::string temp3 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|o:XmlContainer_parseXPathExpression self txn query context ",0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (XmlQueryExpression *)XmlContainer_parseXPathExpression((XmlContainer const *)arg1,arg2,(std::string const &)*arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlQueryExpression,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_queryWithXPath(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|oi:XmlContainer_queryWithXPath self txn query context flags ",0,0,0,0,&arg5) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (XmlResults *)XmlContainer_queryWithXPath((XmlContainer const *)arg1,arg2,(std::string const &)*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlResults,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_queryWithXPathExpression(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlQueryExpression *arg3 = 0 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    XmlResults *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo|i:XmlContainer_queryWithXPathExpression self txn query flags ",0,0,0,&arg4) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (XmlResults *)XmlContainer_queryWithXPath((XmlContainer const *)arg1,arg2,*arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlResults,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_query(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    char *arg3 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    u_int32_t *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oos|o:XmlContainer_query self txn query context ",0,0,&arg3,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        char *arg = Tcl_GetStringFromObj(objv[2], NULL);
        DB_TXN *txnp = NAME_TO_TXN(arg);
        arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
    }
    if (objc > 4) {
        if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (u_int32_t *)XmlContainer_query((XmlContainer const *)arg1,arg2,(char const *)arg3,arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        for (int i = 0; result[i]; i++)
        Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), Tcl_NewIntObj(result[i]));
        delete [] result;
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_dump(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"os|i:XmlContainer_dump self filename flags ",0,&arg2,&arg3) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            XmlContainer_dump(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_load(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"os|i:XmlContainer_load self filename flags ",0,&arg2,&arg3) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            XmlContainer_load(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlContainer_verify(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"os|i:XmlContainer_verify self filename flags ",0,&arg2,&arg3) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            XmlContainer_verify(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlContainer(void *obj) {
XmlContainer *arg1 = (XmlContainer *) obj;
delete arg1;
}
static swig_method swig_XmlContainer_methods[] = {
    {"setPageSize", _wrap_XmlContainer_setPageSize}, 
    {"open", _wrap_XmlContainer_open}, 
    {"exists", _wrap_XmlContainer_exists}, 
    {"isOpen", _wrap_XmlContainer_isOpen}, 
    {"close", _wrap_XmlContainer_close}, 
    {"setIndexSpecification", _wrap_XmlContainer_setIndexSpecification}, 
    {"addIndex", _wrap_XmlContainer_addIndex}, 
    {"deleteIndex", _wrap_XmlContainer_deleteIndex}, 
    {"replaceIndex", _wrap_XmlContainer_replaceIndex}, 
    {"upgrade", _wrap_XmlContainer_upgrade}, 
    {"getIndexSpecification", _wrap_XmlContainer_getIndexSpecification}, 
    {"getName", _wrap_XmlContainer_getName}, 
    {"setName", _wrap_XmlContainer_setName}, 
    {"putDocument", _wrap_XmlContainer_putDocument}, 
    {"updateDocument", _wrap_XmlContainer_updateDocument}, 
    {"remove", _wrap_XmlContainer_remove}, 
    {"rename", _wrap_XmlContainer_rename}, 
    {"deleteDocumentByID", _wrap_XmlContainer_deleteDocumentByID}, 
    {"deleteDocument", _wrap_XmlContainer_deleteDocument}, 
    {"modifyDocument", _wrap_XmlContainer_modifyDocument}, 
    {"getDocument", _wrap_XmlContainer_getDocument}, 
    {"parseXPathExpression", _wrap_XmlContainer_parseXPathExpression}, 
    {"queryWithXPath", _wrap_XmlContainer_queryWithXPath}, 
    {"queryWithXPathExpression", _wrap_XmlContainer_queryWithXPathExpression}, 
    {"query", _wrap_XmlContainer_query}, 
    {"dump", _wrap_XmlContainer_dump}, 
    {"load", _wrap_XmlContainer_load}, 
    {"verify", _wrap_XmlContainer_verify}, 
    {0,0}
};
static swig_attribute swig_XmlContainer_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlContainer_bases[] = {0};
swig_class _wrap_class_XmlContainer = { "XmlContainer", &SWIGTYPE_p_XmlContainer,_wrap_new_XmlContainer, swig_delete_XmlContainer, swig_XmlContainer_methods, swig_XmlContainer_attributes, swig_XmlContainer_bases };
static int
_wrap_new_XmlDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *result;
    
    if (SWIG_GetArgs(interp, objc, objv,":new_XmlDocument ") == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlDocument *)new XmlDocument();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlDocument,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlDocument self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_getID(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    u_int32_t result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlDocument_getID self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (u_int32_t)((XmlDocument const *)arg1)->getID();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_setName(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlDocument_setName self name ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->setName((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_getName(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlDocument_getName self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = ((XmlDocument const *)arg1)->getName();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        Tcl_SetStringObj(Tcl_GetObjResult(interp),(char*)(&result)->c_str(),(&result)->length());
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_setContent(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    Dbt *arg2 = 0 ;
    Dbt dbt2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlDocument_setContent self content ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        int len;
        char *data = (char *)Tcl_GetByteArrayFromObj(objv[2], &len);
        dbt2.set_data(data);
        dbt2.set_size(len);
        arg2 = &dbt2;
    }
    {
        try {
            (arg1)->setContent(*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_getContent(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    Dbt *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlDocument_getContent self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (Dbt *)((XmlDocument const *)arg1)->getContent();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        if (result)
        Tcl_SetObjResult(interp, Tcl_NewByteArrayObj((unsigned char *)result->get_data(), result->get_size()));
        else
        Tcl_SetResult(interp, (char *) "", TCL_STATIC);
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_modifyDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    XmlModify *arg2 = 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlDocument_modifyDocument self modify ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->modifyDocument(*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_getContentAsString(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlDocument_getContentAsString self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = XmlDocument_getContentAsString((XmlDocument const *)arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        Tcl_SetStringObj(Tcl_GetObjResult(interp),(char*)(&result)->c_str(),(&result)->length());
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_setMetaData(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooooo:XmlDocument_setMetaData self uri prefix name value ",0,0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    if ((SWIG_ConvertPtr(interp, objv[5], (void **) &arg5, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->setMetaData((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(XmlValue const &)*arg5);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_getMetaData(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    XmlValue *arg4 = 0 ;
    bool result;
    std::string temp2 ;
    std::string temp3 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oooo:XmlDocument_getMetaData self uri name value ",0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    if ((SWIG_ConvertPtr(interp, objv[4], (void **) &arg4, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)(arg1)->getMetaData((std::string const &)*arg2,(std::string const &)*arg3,*arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_queryWithXPath(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    XmlQueryContext *arg3 = (XmlQueryContext *) 0 ;
    XmlResults *result;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo|o:XmlDocument_queryWithXPath self query context ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    if (objc > 3) {
        if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (XmlResults *)XmlDocument_queryWithXPath((XmlDocument const *)arg1,(std::string const &)*arg2,arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlResults,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlDocument_queryWithXPathExpression(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    XmlQueryExpression *arg2 = 0 ;
    XmlResults *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlDocument_queryWithXPathExpression self query ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (XmlResults *)XmlDocument_queryWithXPath((XmlDocument const *)arg1,*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlResults,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlDocument(void *obj) {
XmlDocument *arg1 = (XmlDocument *) obj;
delete arg1;
}
static swig_method swig_XmlDocument_methods[] = {
    {"getID", _wrap_XmlDocument_getID}, 
    {"setName", _wrap_XmlDocument_setName}, 
    {"getName", _wrap_XmlDocument_getName}, 
    {"setContent", _wrap_XmlDocument_setContent}, 
    {"getContent", _wrap_XmlDocument_getContent}, 
    {"modifyDocument", _wrap_XmlDocument_modifyDocument}, 
    {"getContentAsString", _wrap_XmlDocument_getContentAsString}, 
    {"setMetaData", _wrap_XmlDocument_setMetaData}, 
    {"getMetaData", _wrap_XmlDocument_getMetaData}, 
    {"queryWithXPath", _wrap_XmlDocument_queryWithXPath}, 
    {"queryWithXPathExpression", _wrap_XmlDocument_queryWithXPathExpression}, 
    {0,0}
};
static swig_attribute swig_XmlDocument_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlDocument_bases[] = {0};
swig_class _wrap_class_XmlDocument = { "XmlDocument", &SWIGTYPE_p_XmlDocument,_wrap_new_XmlDocument, swig_delete_XmlDocument, swig_XmlDocument_methods, swig_XmlDocument_attributes, swig_XmlDocument_bases };
static int
_wrap_new_XmlQueryContext(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    int arg1 = (int) XmlQueryContext::ResultDocuments ;
    int arg2 = (int) XmlQueryContext::Eager ;
    XmlQueryContext *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"|ii:new_XmlQueryContext returnType evaluationType ",&arg1,&arg2) == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlQueryContext *)new XmlQueryContext((XmlQueryContext::ReturnType )arg1,(XmlQueryContext::EvaluationType )arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlQueryContext,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlQueryContext(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlQueryContext self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_setNamespace(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo:XmlQueryContext_setNamespace self prefix uri ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        try {
            (arg1)->setNamespace((std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_getNamespace(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string result;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlQueryContext_getNamespace self prefix ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            result = (arg1)->getNamespace((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        Tcl_SetStringObj(Tcl_GetObjResult(interp),(char*)(&result)->c_str(),(&result)->length());
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_removeNamespace(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlQueryContext_removeNamespace self prefix ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->removeNamespace((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_clearNamespaces(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryContext_clearNamespaces self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->clearNamespaces();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_setVariableValue(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    XmlValue *arg3 = 0 ;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo:XmlQueryContext_setVariableValue self name value ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->setVariableValue((std::string const &)*arg2,(XmlValue const &)*arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_setReturnType(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int arg2 = (int) XmlQueryContext::ResultDocuments ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|i:XmlQueryContext_setReturnType self type ",0,&arg2) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->setReturnType((XmlQueryContext::ReturnType )arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_getReturnType(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryContext_getReturnType self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (int)((XmlQueryContext const *)arg1)->getReturnType();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_setEvaluationType(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int arg2 = (int) XmlQueryContext::Eager ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|i:XmlQueryContext_setEvaluationType self type ",0,&arg2) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->setEvaluationType((XmlQueryContext::EvaluationType )arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_getEvaluationType(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryContext_getEvaluationType self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (int)((XmlQueryContext const *)arg1)->getEvaluationType();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_setWithMetaData(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    bool arg2 ;
    int tempb2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlQueryContext_setWithMetaData self withMetaData ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (Tcl_GetIntFromObj(interp,objv[2],&tempb2) == TCL_ERROR) SWIG_fail;
    arg2 = tempb2 ? true : false;
    {
        try {
            (arg1)->setWithMetaData(arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_getWithMetaData(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryContext_getWithMetaData self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)((XmlQueryContext const *)arg1)->getWithMetaData();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_getVariableValue(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    XmlValue *result;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlQueryContext_getVariableValue self name ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            result = (XmlValue *)XmlQueryContext_getVariableValue(arg1,(std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlValue,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_get(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    char *arg2 ;
    std::string result;
    
    if (SWIG_GetArgs(interp, objc, objv,"os:XmlQueryContext_get self name ",0,&arg2) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = XmlQueryContext_get((XmlQueryContext const *)arg1,(char const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        Tcl_SetStringObj(Tcl_GetObjResult(interp),(char*)(&result)->c_str(),(&result)->length());
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_set(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo:XmlQueryContext_set self name value ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        try {
            XmlQueryContext_set(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryContext_setDebugVariable(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlQueryContext_setDebugVariable self var ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            XmlQueryContext_setDebugVariable(arg1,(std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlQueryContext(void *obj) {
XmlQueryContext *arg1 = (XmlQueryContext *) obj;
delete arg1;
}
static swig_method swig_XmlQueryContext_methods[] = {
    {"setNamespace", _wrap_XmlQueryContext_setNamespace}, 
    {"getNamespace", _wrap_XmlQueryContext_getNamespace}, 
    {"removeNamespace", _wrap_XmlQueryContext_removeNamespace}, 
    {"clearNamespaces", _wrap_XmlQueryContext_clearNamespaces}, 
    {"setVariableValue", _wrap_XmlQueryContext_setVariableValue}, 
    {"setReturnType", _wrap_XmlQueryContext_setReturnType}, 
    {"getReturnType", _wrap_XmlQueryContext_getReturnType}, 
    {"setEvaluationType", _wrap_XmlQueryContext_setEvaluationType}, 
    {"getEvaluationType", _wrap_XmlQueryContext_getEvaluationType}, 
    {"setWithMetaData", _wrap_XmlQueryContext_setWithMetaData}, 
    {"getWithMetaData", _wrap_XmlQueryContext_getWithMetaData}, 
    {"getVariableValue", _wrap_XmlQueryContext_getVariableValue}, 
    {"get", _wrap_XmlQueryContext_get}, 
    {"set", _wrap_XmlQueryContext_set}, 
    {"setDebugVariable", _wrap_XmlQueryContext_setDebugVariable}, 
    {0,0}
};
static swig_attribute swig_XmlQueryContext_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlQueryContext_bases[] = {0};
swig_class _wrap_class_XmlQueryContext = { "XmlQueryContext", &SWIGTYPE_p_XmlQueryContext,_wrap_new_XmlQueryContext, swig_delete_XmlQueryContext, swig_XmlQueryContext_methods, swig_XmlQueryContext_attributes, swig_XmlQueryContext_bases };
static int
_wrap_new_XmlResults(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryContext *arg1 = 0 ;
    DbTxn *arg2 = (DbTxn *) NULL ;
    XmlResults *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:new_XmlResults context txn ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        {
            char *arg = Tcl_GetStringFromObj(objv[2], NULL);
            DB_TXN *txnp = NAME_TO_TXN(arg);
            arg2 = txnp ? DbTxn::wrap_DB_TXN(txnp) : 0;
        }
    }
    {
        try {
            result = (XmlResults *)new XmlResults(*arg1,arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlResults,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlResults(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlResults self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlResults_next__SWIG_0(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlValue *arg2 = 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlResults_next self value ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)(arg1)->next(*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlResults_next__SWIG_1(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlDocument *arg2 = 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlResults_next self document ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)(arg1)->next(*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlResults_next__SWIG_2(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlDocument *arg2 = 0 ;
    XmlValue *arg3 = 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo:XmlResults_next self document value ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)(arg1)->next(*arg2,*arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlResults_next(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    Tcl_Obj *CONST *argv = objv+1;
    int argc = objc-1;
    if (argc == 2) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(interp, argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == TCL_ERROR) {
                _v = 0;
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                void *ptr;
                if (SWIG_ConvertPtr(interp, argv[1], (void **) &ptr, SWIGTYPE_p_XmlValue, 0) == TCL_ERROR) {
                    _v = 0;
                }else {
                    _v = 1;
                }
            }
            if (_v) {
                return _wrap_XmlResults_next__SWIG_0(clientData, interp, objc, objv);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(interp, argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == TCL_ERROR) {
                _v = 0;
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                void *ptr;
                if (SWIG_ConvertPtr(interp, argv[1], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == TCL_ERROR) {
                    _v = 0;
                }else {
                    _v = 1;
                }
            }
            if (_v) {
                return _wrap_XmlResults_next__SWIG_1(clientData, interp, objc, objv);
            }
        }
    }
    if (argc == 3) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(interp, argv[0], (void **) &ptr, SWIGTYPE_p_XmlResults, 0) == TCL_ERROR) {
                _v = 0;
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                void *ptr;
                if (SWIG_ConvertPtr(interp, argv[1], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == TCL_ERROR) {
                    _v = 0;
                }else {
                    _v = 1;
                }
            }
            if (_v) {
                {
                    void *ptr;
                    if (SWIG_ConvertPtr(interp, argv[2], (void **) &ptr, SWIGTYPE_p_XmlValue, 0) == TCL_ERROR) {
                        _v = 0;
                    }else {
                        _v = 1;
                    }
                }
                if (_v) {
                    return _wrap_XmlResults_next__SWIG_2(clientData, interp, objc, objv);
                }
            }
        }
    }
    
    Tcl_SetResult(interp,(char *) "No matching function for overloaded 'XmlResults_next'", TCL_STATIC);
    return TCL_ERROR;
}


static int
_wrap_XmlResults_reset(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlResults_reset self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->reset();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlResults_size(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    size_t result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlResults_size self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = ((XmlResults const *)arg1)->size();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlResults_add(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlValue *arg2 = 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlResults_add self value ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlResults,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->add((XmlValue const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlResults(void *obj) {
XmlResults *arg1 = (XmlResults *) obj;
delete arg1;
}
static swig_method swig_XmlResults_methods[] = {
    {"next", _wrap_XmlResults_next}, 
    {"reset", _wrap_XmlResults_reset}, 
    {"size", _wrap_XmlResults_size}, 
    {"add", _wrap_XmlResults_add}, 
    {0,0}
};
static swig_attribute swig_XmlResults_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlResults_bases[] = {0};
swig_class _wrap_class_XmlResults = { "XmlResults", &SWIGTYPE_p_XmlResults,_wrap_new_XmlResults, swig_delete_XmlResults, swig_XmlResults_methods, swig_XmlResults_attributes, swig_XmlResults_bases };
static int
_wrap_new_XmlUpdateContext(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = 0 ;
    XmlUpdateContext *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:new_XmlUpdateContext container ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (XmlUpdateContext *)new XmlUpdateContext(*arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlUpdateContext,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlUpdateContext(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlUpdateContext *arg1 = (XmlUpdateContext *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlUpdateContext self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlUpdateContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlUpdateContext(void *obj) {
XmlUpdateContext *arg1 = (XmlUpdateContext *) obj;
delete arg1;
}
static swig_method swig_XmlUpdateContext_methods[] = {
    {0,0}
};
static swig_attribute swig_XmlUpdateContext_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlUpdateContext_bases[] = {0};
swig_class _wrap_class_XmlUpdateContext = { "XmlUpdateContext", &SWIGTYPE_p_XmlUpdateContext,_wrap_new_XmlUpdateContext, swig_delete_XmlUpdateContext, swig_XmlUpdateContext_methods, swig_XmlUpdateContext_attributes, swig_XmlUpdateContext_bases };
static int
_wrap_new_XmlValue__SWIG_0(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *result;
    
    if (SWIG_GetArgs(interp, objc, objv,":new_XmlValue ") == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlValue *)new XmlValue();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlValue,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlValue__SWIG_1(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlDocument *arg1 = 0 ;
    XmlValue *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:new_XmlValue v ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlDocument,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (XmlValue *)new XmlValue(*arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlValue,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlValue__SWIG_2(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    double arg1 ;
    XmlValue *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"d:new_XmlValue v ",&arg1) == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlValue *)new XmlValue(arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlValue,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlValue__SWIG_3(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    char *arg1 ;
    XmlValue *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"s:new_XmlValue v ",&arg1) == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlValue *)new XmlValue((char const *)arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlValue,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlValue__SWIG_4(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    int arg1 ;
    char *arg2 ;
    XmlValue *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"is:new_XmlValue type v ",&arg1,&arg2) == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlValue *)new XmlValue((XmlValue::Type )arg1,(char const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlValue,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlValue(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    Tcl_Obj *CONST *argv = objv+1;
    int argc = objc-1;
    if (argc == 0) {
        return _wrap_new_XmlValue__SWIG_0(clientData, interp, objc, objv);
    }
    if (argc == 1) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(interp, argv[0], (void **) &ptr, SWIGTYPE_p_XmlDocument, 0) == TCL_ERROR) {
                _v = 0;
            }else {
                _v = 1;
            }
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_1(clientData, interp, objc, objv);
        }
    }
    if (argc == 1) {
        int _v;
        {
            double tmp;
            if (Tcl_GetDoubleFromObj(NULL,argv[0],&tmp) == TCL_ERROR) _v = 0;
            else _v = 1;
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_2(clientData, interp, objc, objv);
        }
    }
    if (argc == 1) {
        int _v;
        {
            _v = 1;
        }
        if (_v) {
            return _wrap_new_XmlValue__SWIG_3(clientData, interp, objc, objv);
        }
    }
    if (argc == 2) {
        int _v;
        {
            long tmp;
            if (Tcl_GetLongFromObj(NULL,argv[0],&tmp) == TCL_ERROR) _v = 0;
            else _v = 1;
        }
        if (_v) {
            {
                _v = 1;
            }
            if (_v) {
                return _wrap_new_XmlValue__SWIG_4(clientData, interp, objc, objv);
            }
        }
    }
    
    Tcl_SetResult(interp,(char *) "No matching function for overloaded 'new_XmlValue'", TCL_STATIC);
    return TCL_ERROR;
}


static int
_wrap_delete_XmlValue(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlValue self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_getType(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    int result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_getType self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (int)((XmlValue const *)arg1)->getType((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isNumber(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_isNumber self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNumber((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isString(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_isString self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isString((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isBoolean(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_isBoolean self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isBoolean((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isNode(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_isNode self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNode((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_isDocument self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isDocument((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isVariable(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_isVariable self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isVariable((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_isNull(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlValue_isNull self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNull();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_asNumber(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    double result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_asNumber self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (double)((XmlValue const *)arg1)->asNumber((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewDoubleObj((double) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_asString(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    std::string result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_asString self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = ((XmlValue const *)arg1)->asString((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    {
        Tcl_SetStringObj(Tcl_GetObjResult(interp),(char*)(&result)->c_str(),(&result)->length());
    }
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_asBoolean(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_asBoolean self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->asBoolean((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_asDocument(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    XmlDocument *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o|o:XmlValue_asDocument self context ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 2) {
        if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (XmlDocument *)XmlValue_asDocument((XmlValue const *)arg1,(XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlDocument,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlValue_equals(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlValue *arg2 = 0 ;
    XmlQueryContext *arg3 = (XmlQueryContext *) 0 ;
    bool result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo|o:XmlValue_equals self value context ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlValue,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if (objc > 3) {
        if ((SWIG_ConvertPtr(interp, objv[3], (void **) &arg3, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->equals((XmlValue const &)*arg2,(XmlQueryContext const *)arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlValue(void *obj) {
XmlValue *arg1 = (XmlValue *) obj;
delete arg1;
}
static swig_method swig_XmlValue_methods[] = {
    {"getType", _wrap_XmlValue_getType}, 
    {"isNumber", _wrap_XmlValue_isNumber}, 
    {"isString", _wrap_XmlValue_isString}, 
    {"isBoolean", _wrap_XmlValue_isBoolean}, 
    {"isNode", _wrap_XmlValue_isNode}, 
    {"isDocument", _wrap_XmlValue_isDocument}, 
    {"isVariable", _wrap_XmlValue_isVariable}, 
    {"isNull", _wrap_XmlValue_isNull}, 
    {"asNumber", _wrap_XmlValue_asNumber}, 
    {"asString", _wrap_XmlValue_asString}, 
    {"asBoolean", _wrap_XmlValue_asBoolean}, 
    {"asDocument", _wrap_XmlValue_asDocument}, 
    {"equals", _wrap_XmlValue_equals}, 
    {0,0}
};
static swig_attribute swig_XmlValue_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlValue_bases[] = {0};
swig_class _wrap_class_XmlValue = { "XmlValue", &SWIGTYPE_p_XmlValue,_wrap_new_XmlValue, swig_delete_XmlValue, swig_XmlValue_methods, swig_XmlValue_attributes, swig_XmlValue_bases };
static int
_wrap_new_XmlIndexSpecification(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexSpecification *result;
    
    if (SWIG_GetArgs(interp, objc, objv,":new_XmlIndexSpecification ") == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlIndexSpecification *)new XmlIndexSpecification();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlIndexSpecification,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlIndexSpecification(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlIndexSpecification self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexSpecification_addIndex(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oooo:XmlIndexSpecification_addIndex self uri name index ",0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        try {
            (arg1)->addIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexSpecification_deleteIndex(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oooo:XmlIndexSpecification_deleteIndex self uri name index ",0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        try {
            (arg1)->deleteIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexSpecification_replaceIndex(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oooo:XmlIndexSpecification_replaceIndex self uri name index ",0,0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        try {
            (arg1)->replaceIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexSpecification_reset(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlIndexSpecification_reset self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            (arg1)->reset();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexSpecification_find(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    XmlIndexDeclaration *result;
    std::string temp2 ;
    std::string temp3 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"ooo:XmlIndexSpecification_find self uri name ",0,0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        temp3 = std::string(Tcl_GetStringFromObj(objv[3],NULL));
        arg3 = &temp3;
    }
    {
        try {
            result = (XmlIndexDeclaration *)XmlIndexSpecification_find(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlIndexDeclaration,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexSpecification_next(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    XmlIndexDeclaration *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlIndexSpecification_next self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (XmlIndexDeclaration *)XmlIndexSpecification_next(arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlIndexDeclaration,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlIndexSpecification(void *obj) {
XmlIndexSpecification *arg1 = (XmlIndexSpecification *) obj;
delete arg1;
}
static swig_method swig_XmlIndexSpecification_methods[] = {
    {"addIndex", _wrap_XmlIndexSpecification_addIndex}, 
    {"deleteIndex", _wrap_XmlIndexSpecification_deleteIndex}, 
    {"replaceIndex", _wrap_XmlIndexSpecification_replaceIndex}, 
    {"reset", _wrap_XmlIndexSpecification_reset}, 
    {"find", _wrap_XmlIndexSpecification_find}, 
    {"next", _wrap_XmlIndexSpecification_next}, 
    {0,0}
};
static swig_attribute swig_XmlIndexSpecification_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlIndexSpecification_bases[] = {0};
swig_class _wrap_class_XmlIndexSpecification = { "XmlIndexSpecification", &SWIGTYPE_p_XmlIndexSpecification,_wrap_new_XmlIndexSpecification, swig_delete_XmlIndexSpecification, swig_XmlIndexSpecification_methods, swig_XmlIndexSpecification_attributes, swig_XmlIndexSpecification_bases };
static int
_wrap_delete_XmlIndexDeclaration(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlIndexDeclaration self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexDeclaration_get_uri(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlIndexDeclaration_get_uri self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (char *)XmlIndexDeclaration_get_uri((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewStringObj(result,-1));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexDeclaration_get_name(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlIndexDeclaration_get_name self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (char *)XmlIndexDeclaration_get_name((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewStringObj(result,-1));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlIndexDeclaration_get_index(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlIndexDeclaration_get_index self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (char *)XmlIndexDeclaration_get_index((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewStringObj(result,-1));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlIndexDeclaration(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlIndexDeclaration *result;
    
    if (SWIG_GetArgs(interp, objc, objv,":new_XmlIndexDeclaration ") == TCL_ERROR) SWIG_fail;
    {
        try {
            result = (XmlIndexDeclaration *)new XmlIndexDeclaration();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlIndexDeclaration,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlIndexDeclaration(void *obj) {
XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) obj;
delete arg1;
}
static swig_method swig_XmlIndexDeclaration_methods[] = {
    {"get_uri", _wrap_XmlIndexDeclaration_get_uri}, 
    {"get_name", _wrap_XmlIndexDeclaration_get_name}, 
    {"get_index", _wrap_XmlIndexDeclaration_get_index}, 
    {0,0}
};
static swig_attribute swig_XmlIndexDeclaration_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlIndexDeclaration_bases[] = {0};
swig_class _wrap_class_XmlIndexDeclaration = { "XmlIndexDeclaration", &SWIGTYPE_p_XmlIndexDeclaration,_wrap_new_XmlIndexDeclaration, swig_delete_XmlIndexDeclaration, swig_XmlIndexDeclaration_methods, swig_XmlIndexDeclaration_attributes, swig_XmlIndexDeclaration_bases };
static int
_wrap_new_XmlQueryExpression(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlContainer *arg1 = 0 ;
    XmlQueryContext *arg2 = 0 ;
    XmlQueryExpression *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:new_XmlQueryExpression XmlContainer & XmlQueryContext & ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlContainer,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[2], (void **) &arg2, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (XmlQueryExpression *)new XmlQueryExpression(*arg1,*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlQueryExpression,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_delete_XmlQueryExpression(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlQueryExpression self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryExpression_getQueryContext(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    XmlQueryContext *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryExpression_getQueryContext self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            {
                XmlQueryContext &_result_ref = ((XmlQueryExpression const *)arg1)->getQueryContext();
                result = (XmlQueryContext *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlQueryContext,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryExpression_getContainer(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    XmlContainer *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryExpression_getContainer self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            {
                XmlContainer const &_result_ref = ((XmlQueryExpression const *)arg1)->getContainer();
                result = (XmlContainer *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlContainer,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlQueryExpression_getXPathQuery(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    char *result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlQueryExpression_getXPathQuery self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (char *)XmlQueryExpression_getXPathQuery((XmlQueryExpression const *)arg1);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewStringObj(result,-1));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlQueryExpression(void *obj) {
XmlQueryExpression *arg1 = (XmlQueryExpression *) obj;
delete arg1;
}
static swig_method swig_XmlQueryExpression_methods[] = {
    {"getQueryContext", _wrap_XmlQueryExpression_getQueryContext}, 
    {"getContainer", _wrap_XmlQueryExpression_getContainer}, 
    {"getXPathQuery", _wrap_XmlQueryExpression_getXPathQuery}, 
    {0,0}
};
static swig_attribute swig_XmlQueryExpression_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlQueryExpression_bases[] = {0};
swig_class _wrap_class_XmlQueryExpression = { "XmlQueryExpression", &SWIGTYPE_p_XmlQueryExpression,_wrap_new_XmlQueryExpression, swig_delete_XmlQueryExpression, swig_XmlQueryExpression_methods, swig_XmlQueryExpression_attributes, swig_XmlQueryExpression_bases };
static int
_wrap_new_XmlModify__SWIG_0(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oiioo|io:new_XmlModify xpath operation type name content location context ",0,&arg2,&arg3,0,0,&arg6,0) == TCL_ERROR) SWIG_fail;
    {
        temp1 = std::string(Tcl_GetStringFromObj(objv[1],NULL));
        arg1 = &temp1;
    }
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        temp5 = std::string(Tcl_GetStringFromObj(objv[5],NULL));
        arg5 = &temp5;
    }
    if (objc > 7) {
        if ((SWIG_ConvertPtr(interp, objv[7], (void **) &arg7, SWIGTYPE_p_XmlQueryContext,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) 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) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlModify,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlModify__SWIG_1(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    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 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oiioo|i:new_XmlModify expression operation type name content location ",0,&arg2,&arg3,0,0,&arg6) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlQueryExpression,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp4 = std::string(Tcl_GetStringFromObj(objv[4],NULL));
        arg4 = &temp4;
    }
    {
        temp5 = std::string(Tcl_GetStringFromObj(objv[5],NULL));
        arg5 = &temp5;
    }
    {
        try {
            result = (XmlModify *)new XmlModify(*arg1,(XmlModify::ModificationType )arg2,(XmlModify::XmlObject )arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,SWIG_NewInstanceObj(interp, (void *) result, SWIGTYPE_p_XmlModify,0));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_new_XmlModify(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    Tcl_Obj *CONST *argv = objv+1;
    int argc = objc-1;
    if ((argc >= 5) && (argc <= 6)) {
        int _v;
        {
            void *ptr;
            if (SWIG_ConvertPtr(interp, argv[0], (void **) &ptr, SWIGTYPE_p_XmlQueryExpression, 0) == TCL_ERROR) {
                _v = 0;
            }else {
                _v = 1;
            }
        }
        if (_v) {
            {
                long tmp;
                if (Tcl_GetLongFromObj(NULL,argv[1],&tmp) == TCL_ERROR) _v = 0;
                else _v = 1;
            }
            if (_v) {
                {
                    long tmp;
                    if (Tcl_GetLongFromObj(NULL,argv[2],&tmp) == TCL_ERROR) _v = 0;
                    else _v = 1;
                }
                if (_v) {
                    {
                        _v = 1;
                    }
                    if (_v) {
                        {
                            _v = 1;
                        }
                        if (_v) {
                            if (argc <= 5) {
                                return _wrap_new_XmlModify__SWIG_1(clientData, interp, objc, objv);
                            }
                            {
                                long tmp;
                                if (Tcl_GetLongFromObj(NULL,argv[5],&tmp) == TCL_ERROR) _v = 0;
                                else _v = 1;
                            }
                            if (_v) {
                                return _wrap_new_XmlModify__SWIG_1(clientData, interp, objc, objv);
                            }
                        }
                    }
                }
            }
        }
    }
    if ((argc >= 5) && (argc <= 7)) {
        int _v;
        {
            _v = 1;
        }
        if (_v) {
            {
                long tmp;
                if (Tcl_GetLongFromObj(NULL,argv[1],&tmp) == TCL_ERROR) _v = 0;
                else _v = 1;
            }
            if (_v) {
                {
                    long tmp;
                    if (Tcl_GetLongFromObj(NULL,argv[2],&tmp) == TCL_ERROR) _v = 0;
                    else _v = 1;
                }
                if (_v) {
                    {
                        _v = 1;
                    }
                    if (_v) {
                        {
                            _v = 1;
                        }
                        if (_v) {
                            if (argc <= 5) {
                                return _wrap_new_XmlModify__SWIG_0(clientData, interp, objc, objv);
                            }
                            {
                                long tmp;
                                if (Tcl_GetLongFromObj(NULL,argv[5],&tmp) == TCL_ERROR) _v = 0;
                                else _v = 1;
                            }
                            if (_v) {
                                if (argc <= 6) {
                                    return _wrap_new_XmlModify__SWIG_0(clientData, interp, objc, objv);
                                }
                                {
                                    void *ptr;
                                    if (SWIG_ConvertPtr(interp, argv[6], (void **) &ptr, SWIGTYPE_p_XmlQueryContext, 0) == TCL_ERROR) {
                                        _v = 0;
                                    }else {
                                        _v = 1;
                                    }
                                }
                                if (_v) {
                                    return _wrap_new_XmlModify__SWIG_0(clientData, interp, objc, objv);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    Tcl_SetResult(interp,(char *) "No matching function for overloaded 'new_XmlModify'", TCL_STATIC);
    return TCL_ERROR;
}


static int
_wrap_delete_XmlModify(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlModify *arg1 = (XmlModify *) 0 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:delete_XmlModify self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlModify_setNewEncoding(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlModify *arg1 = (XmlModify *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    
    if (SWIG_GetArgs(interp, objc, objv,"oo:XmlModify_setNewEncoding self newEncoding ",0,0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        temp2 = std::string(Tcl_GetStringFromObj(objv[2],NULL));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->setNewEncoding((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static int
_wrap_XmlModify_getNumModifications(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
    XmlModify *arg1 = (XmlModify *) 0 ;
    int result;
    
    if (SWIG_GetArgs(interp, objc, objv,"o:XmlModify_getNumModifications self ",0) == TCL_ERROR) SWIG_fail;
    if ((SWIG_ConvertPtr(interp, objv[1], (void **) &arg1, SWIGTYPE_p_XmlModify,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail;
    {
        try {
            result = (int)(arg1)->getNumModifications();
            
        }catch (XmlException &e) {
            Tcl_SetResult(interp, (char *)e.what(), TCL_VOLATILE);
            return TCL_ERROR;
        }
    }
    Tcl_SetObjResult(interp,Tcl_NewIntObj((long) result));
    return TCL_OK;
    fail:
    return TCL_ERROR;
}


static void swig_delete_XmlModify(void *obj) {
XmlModify *arg1 = (XmlModify *) obj;
delete arg1;
}
static swig_method swig_XmlModify_methods[] = {
    {"setNewEncoding", _wrap_XmlModify_setNewEncoding}, 
    {"getNumModifications", _wrap_XmlModify_getNumModifications}, 
    {0,0}
};
static swig_attribute swig_XmlModify_attributes[] = {
    {0,0,0}
};
static swig_class *swig_XmlModify_bases[] = {0};
swig_class _wrap_class_XmlModify = { "XmlModify", &SWIGTYPE_p_XmlModify,_wrap_new_XmlModify, swig_delete_XmlModify, swig_XmlModify_methods, swig_XmlModify_attributes, swig_XmlModify_bases };

static swig_command_info swig_commands[] = {
    { SWIG_prefix "dbxml_version", (swig_wrapper_func) _wrap_dbxml_version, NULL},
    { SWIG_prefix "setLogLevel", (swig_wrapper_func) _wrap_setLogLevel, NULL},
    { SWIG_prefix "setLogCategory", (swig_wrapper_func) _wrap_setLogCategory, NULL},
    { SWIG_prefix "new_XmlContainer", (swig_wrapper_func) _wrap_new_XmlContainer, NULL},
    { SWIG_prefix "delete_XmlContainer", (swig_wrapper_func) _wrap_delete_XmlContainer, NULL},
    { SWIG_prefix "XmlContainer_setPageSize", (swig_wrapper_func) _wrap_XmlContainer_setPageSize, NULL},
    { SWIG_prefix "XmlContainer_open", (swig_wrapper_func) _wrap_XmlContainer_open, NULL},
    { SWIG_prefix "XmlContainer_exists", (swig_wrapper_func) _wrap_XmlContainer_exists, NULL},
    { SWIG_prefix "XmlContainer_isOpen", (swig_wrapper_func) _wrap_XmlContainer_isOpen, NULL},
    { SWIG_prefix "XmlContainer_close", (swig_wrapper_func) _wrap_XmlContainer_close, NULL},
    { SWIG_prefix "XmlContainer_setIndexSpecification", (swig_wrapper_func) _wrap_XmlContainer_setIndexSpecification, NULL},
    { SWIG_prefix "XmlContainer_addIndex", (swig_wrapper_func) _wrap_XmlContainer_addIndex, NULL},
    { SWIG_prefix "XmlContainer_deleteIndex", (swig_wrapper_func) _wrap_XmlContainer_deleteIndex, NULL},
    { SWIG_prefix "XmlContainer_replaceIndex", (swig_wrapper_func) _wrap_XmlContainer_replaceIndex, NULL},
    { SWIG_prefix "XmlContainer_upgrade", (swig_wrapper_func) _wrap_XmlContainer_upgrade, NULL},
    { SWIG_prefix "XmlContainer_getIndexSpecification", (swig_wrapper_func) _wrap_XmlContainer_getIndexSpecification, NULL},
    { SWIG_prefix "XmlContainer_getName", (swig_wrapper_func) _wrap_XmlContainer_getName, NULL},
    { SWIG_prefix "XmlContainer_setName", (swig_wrapper_func) _wrap_XmlContainer_setName, NULL},
    { SWIG_prefix "XmlContainer_putDocument", (swig_wrapper_func) _wrap_XmlContainer_putDocument, NULL},
    { SWIG_prefix "XmlContainer_updateDocument", (swig_wrapper_func) _wrap_XmlContainer_updateDocument, NULL},
    { SWIG_prefix "XmlContainer_remove", (swig_wrapper_func) _wrap_XmlContainer_remove, NULL},
    { SWIG_prefix "XmlContainer_rename", (swig_wrapper_func) _wrap_XmlContainer_rename, NULL},
    { SWIG_prefix "XmlContainer_deleteDocumentByID", (swig_wrapper_func) _wrap_XmlContainer_deleteDocumentByID, NULL},
    { SWIG_prefix "XmlContainer_deleteDocument", (swig_wrapper_func) _wrap_XmlContainer_deleteDocument, NULL},
    { SWIG_prefix "XmlContainer_modifyDocument", (swig_wrapper_func) _wrap_XmlContainer_modifyDocument, NULL},
    { SWIG_prefix "XmlContainer_getDocument", (swig_wrapper_func) _wrap_XmlContainer_getDocument, NULL},
    { SWIG_prefix "XmlContainer_parseXPathExpression", (swig_wrapper_func) _wrap_XmlContainer_parseXPathExpression, NULL},
    { SWIG_prefix "XmlContainer_queryWithXPath", (swig_wrapper_func) _wrap_XmlContainer_queryWithXPath, NULL},
    { SWIG_prefix "XmlContainer_queryWithXPathExpression", (swig_wrapper_func) _wrap_XmlContainer_queryWithXPathExpression, NULL},
    { SWIG_prefix "XmlContainer_query", (swig_wrapper_func) _wrap_XmlContainer_query, NULL},
    { SWIG_prefix "XmlContainer_dump", (swig_wrapper_func) _wrap_XmlContainer_dump, NULL},
    { SWIG_prefix "XmlContainer_load", (swig_wrapper_func) _wrap_XmlContainer_load, NULL},
    { SWIG_prefix "XmlContainer_verify", (swig_wrapper_func) _wrap_XmlContainer_verify, NULL},
    { SWIG_prefix "XmlContainer", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlContainer},
    { SWIG_prefix "new_XmlDocument", (swig_wrapper_func) _wrap_new_XmlDocument, NULL},
    { SWIG_prefix "delete_XmlDocument", (swig_wrapper_func) _wrap_delete_XmlDocument, NULL},
    { SWIG_prefix "XmlDocument_getID", (swig_wrapper_func) _wrap_XmlDocument_getID, NULL},
    { SWIG_prefix "XmlDocument_setName", (swig_wrapper_func) _wrap_XmlDocument_setName, NULL},
    { SWIG_prefix "XmlDocument_getName", (swig_wrapper_func) _wrap_XmlDocument_getName, NULL},
    { SWIG_prefix "XmlDocument_setContent", (swig_wrapper_func) _wrap_XmlDocument_setContent, NULL},
    { SWIG_prefix "XmlDocument_getContent", (swig_wrapper_func) _wrap_XmlDocument_getContent, NULL},
    { SWIG_prefix "XmlDocument_modifyDocument", (swig_wrapper_func) _wrap_XmlDocument_modifyDocument, NULL},
    { SWIG_prefix "XmlDocument_getContentAsString", (swig_wrapper_func) _wrap_XmlDocument_getContentAsString, NULL},
    { SWIG_prefix "XmlDocument_setMetaData", (swig_wrapper_func) _wrap_XmlDocument_setMetaData, NULL},
    { SWIG_prefix "XmlDocument_getMetaData", (swig_wrapper_func) _wrap_XmlDocument_getMetaData, NULL},
    { SWIG_prefix "XmlDocument_queryWithXPath", (swig_wrapper_func) _wrap_XmlDocument_queryWithXPath, NULL},
    { SWIG_prefix "XmlDocument_queryWithXPathExpression", (swig_wrapper_func) _wrap_XmlDocument_queryWithXPathExpression, NULL},
    { SWIG_prefix "XmlDocument", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlDocument},
    { SWIG_prefix "new_XmlQueryContext", (swig_wrapper_func) _wrap_new_XmlQueryContext, NULL},
    { SWIG_prefix "delete_XmlQueryContext", (swig_wrapper_func) _wrap_delete_XmlQueryContext, NULL},
    { SWIG_prefix "XmlQueryContext_setNamespace", (swig_wrapper_func) _wrap_XmlQueryContext_setNamespace, NULL},
    { SWIG_prefix "XmlQueryContext_getNamespace", (swig_wrapper_func) _wrap_XmlQueryContext_getNamespace, NULL},
    { SWIG_prefix "XmlQueryContext_removeNamespace", (swig_wrapper_func) _wrap_XmlQueryContext_removeNamespace, NULL},
    { SWIG_prefix "XmlQueryContext_clearNamespaces", (swig_wrapper_func) _wrap_XmlQueryContext_clearNamespaces, NULL},
    { SWIG_prefix "XmlQueryContext_setVariableValue", (swig_wrapper_func) _wrap_XmlQueryContext_setVariableValue, NULL},
    { SWIG_prefix "XmlQueryContext_setReturnType", (swig_wrapper_func) _wrap_XmlQueryContext_setReturnType, NULL},
    { SWIG_prefix "XmlQueryContext_getReturnType", (swig_wrapper_func) _wrap_XmlQueryContext_getReturnType, NULL},
    { SWIG_prefix "XmlQueryContext_setEvaluationType", (swig_wrapper_func) _wrap_XmlQueryContext_setEvaluationType, NULL},
    { SWIG_prefix "XmlQueryContext_getEvaluationType", (swig_wrapper_func) _wrap_XmlQueryContext_getEvaluationType, NULL},
    { SWIG_prefix "XmlQueryContext_setWithMetaData", (swig_wrapper_func) _wrap_XmlQueryContext_setWithMetaData, NULL},
    { SWIG_prefix "XmlQueryContext_getWithMetaData", (swig_wrapper_func) _wrap_XmlQueryContext_getWithMetaData, NULL},
    { SWIG_prefix "XmlQueryContext_getVariableValue", (swig_wrapper_func) _wrap_XmlQueryContext_getVariableValue, NULL},
    { SWIG_prefix "XmlQueryContext_get", (swig_wrapper_func) _wrap_XmlQueryContext_get, NULL},
    { SWIG_prefix "XmlQueryContext_set", (swig_wrapper_func) _wrap_XmlQueryContext_set, NULL},
    { SWIG_prefix "XmlQueryContext_setDebugVariable", (swig_wrapper_func) _wrap_XmlQueryContext_setDebugVariable, NULL},
    { SWIG_prefix "XmlQueryContext", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlQueryContext},
    { SWIG_prefix "new_XmlResults", (swig_wrapper_func) _wrap_new_XmlResults, NULL},
    { SWIG_prefix "delete_XmlResults", (swig_wrapper_func) _wrap_delete_XmlResults, NULL},
    { SWIG_prefix "XmlResults_next", (swig_wrapper_func) _wrap_XmlResults_next, NULL},
    { SWIG_prefix "XmlResults_reset", (swig_wrapper_func) _wrap_XmlResults_reset, NULL},
    { SWIG_prefix "XmlResults_size", (swig_wrapper_func) _wrap_XmlResults_size, NULL},
    { SWIG_prefix "XmlResults_add", (swig_wrapper_func) _wrap_XmlResults_add, NULL},
    { SWIG_prefix "XmlResults", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlResults},
    { SWIG_prefix "new_XmlUpdateContext", (swig_wrapper_func) _wrap_new_XmlUpdateContext, NULL},
    { SWIG_prefix "delete_XmlUpdateContext", (swig_wrapper_func) _wrap_delete_XmlUpdateContext, NULL},
    { SWIG_prefix "XmlUpdateContext", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlUpdateContext},
    { SWIG_prefix "new_XmlValue", (swig_wrapper_func) _wrap_new_XmlValue, NULL},
    { SWIG_prefix "delete_XmlValue", (swig_wrapper_func) _wrap_delete_XmlValue, NULL},
    { SWIG_prefix "XmlValue_getType", (swig_wrapper_func) _wrap_XmlValue_getType, NULL},
    { SWIG_prefix "XmlValue_isNumber", (swig_wrapper_func) _wrap_XmlValue_isNumber, NULL},
    { SWIG_prefix "XmlValue_isString", (swig_wrapper_func) _wrap_XmlValue_isString, NULL},
    { SWIG_prefix "XmlValue_isBoolean", (swig_wrapper_func) _wrap_XmlValue_isBoolean, NULL},
    { SWIG_prefix "XmlValue_isNode", (swig_wrapper_func) _wrap_XmlValue_isNode, NULL},
    { SWIG_prefix "XmlValue_isDocument", (swig_wrapper_func) _wrap_XmlValue_isDocument, NULL},
    { SWIG_prefix "XmlValue_isVariable", (swig_wrapper_func) _wrap_XmlValue_isVariable, NULL},
    { SWIG_prefix "XmlValue_isNull", (swig_wrapper_func) _wrap_XmlValue_isNull, NULL},
    { SWIG_prefix "XmlValue_asNumber", (swig_wrapper_func) _wrap_XmlValue_asNumber, NULL},
    { SWIG_prefix "XmlValue_asString", (swig_wrapper_func) _wrap_XmlValue_asString, NULL},
    { SWIG_prefix "XmlValue_asBoolean", (swig_wrapper_func) _wrap_XmlValue_asBoolean, NULL},
    { SWIG_prefix "XmlValue_asDocument", (swig_wrapper_func) _wrap_XmlValue_asDocument, NULL},
    { SWIG_prefix "XmlValue_equals", (swig_wrapper_func) _wrap_XmlValue_equals, NULL},
    { SWIG_prefix "XmlValue", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlValue},
    { SWIG_prefix "new_XmlIndexSpecification", (swig_wrapper_func) _wrap_new_XmlIndexSpecification, NULL},
    { SWIG_prefix "delete_XmlIndexSpecification", (swig_wrapper_func) _wrap_delete_XmlIndexSpecification, NULL},
    { SWIG_prefix "XmlIndexSpecification_addIndex", (swig_wrapper_func) _wrap_XmlIndexSpecification_addIndex, NULL},
    { SWIG_prefix "XmlIndexSpecification_deleteIndex", (swig_wrapper_func) _wrap_XmlIndexSpecification_deleteIndex, NULL},
    { SWIG_prefix "XmlIndexSpecification_replaceIndex", (swig_wrapper_func) _wrap_XmlIndexSpecification_replaceIndex, NULL},
    { SWIG_prefix "XmlIndexSpecification_reset", (swig_wrapper_func) _wrap_XmlIndexSpecification_reset, NULL},
    { SWIG_prefix "XmlIndexSpecification_find", (swig_wrapper_func) _wrap_XmlIndexSpecification_find, NULL},
    { SWIG_prefix "XmlIndexSpecification_next", (swig_wrapper_func) _wrap_XmlIndexSpecification_next, NULL},
    { SWIG_prefix "XmlIndexSpecification", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlIndexSpecification},
    { SWIG_prefix "delete_XmlIndexDeclaration", (swig_wrapper_func) _wrap_delete_XmlIndexDeclaration, NULL},
    { SWIG_prefix "XmlIndexDeclaration_get_uri", (swig_wrapper_func) _wrap_XmlIndexDeclaration_get_uri, NULL},
    { SWIG_prefix "XmlIndexDeclaration_get_name", (swig_wrapper_func) _wrap_XmlIndexDeclaration_get_name, NULL},
    { SWIG_prefix "XmlIndexDeclaration_get_index", (swig_wrapper_func) _wrap_XmlIndexDeclaration_get_index, NULL},
    { SWIG_prefix "new_XmlIndexDeclaration", (swig_wrapper_func) _wrap_new_XmlIndexDeclaration, NULL},
    { SWIG_prefix "XmlIndexDeclaration", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlIndexDeclaration},
    { SWIG_prefix "new_XmlQueryExpression", (swig_wrapper_func) _wrap_new_XmlQueryExpression, NULL},
    { SWIG_prefix "delete_XmlQueryExpression", (swig_wrapper_func) _wrap_delete_XmlQueryExpression, NULL},
    { SWIG_prefix "XmlQueryExpression_getQueryContext", (swig_wrapper_func) _wrap_XmlQueryExpression_getQueryContext, NULL},
    { SWIG_prefix "XmlQueryExpression_getContainer", (swig_wrapper_func) _wrap_XmlQueryExpression_getContainer, NULL},
    { SWIG_prefix "XmlQueryExpression_getXPathQuery", (swig_wrapper_func) _wrap_XmlQueryExpression_getXPathQuery, NULL},
    { SWIG_prefix "XmlQueryExpression", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlQueryExpression},
    { SWIG_prefix "new_XmlModify", (swig_wrapper_func) _wrap_new_XmlModify, NULL},
    { SWIG_prefix "delete_XmlModify", (swig_wrapper_func) _wrap_delete_XmlModify, NULL},
    { SWIG_prefix "XmlModify_setNewEncoding", (swig_wrapper_func) _wrap_XmlModify_setNewEncoding, NULL},
    { SWIG_prefix "XmlModify_getNumModifications", (swig_wrapper_func) _wrap_XmlModify_getNumModifications, NULL},
    { SWIG_prefix "XmlModify", (swig_wrapper_func) SWIG_ObjectConstructor, &_wrap_class_XmlModify},
    {0, 0, 0}
};

static swig_var_info swig_variables[] = {
    {0,0,0,0}
};

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

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

static swig_type_info _swigt__p_XmlResults[] = {{"_p_XmlResults", 0, "XmlResults *", &_wrap_class_XmlResults, 0, 0, 0},{"_p_XmlResults", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlQueryContext[] = {{"_p_XmlQueryContext", 0, "XmlQueryContext *", &_wrap_class_XmlQueryContext, 0, 0, 0},{"_p_XmlQueryContext", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlUpdateContext[] = {{"_p_XmlUpdateContext", 0, "XmlUpdateContext *", &_wrap_class_XmlUpdateContext, 0, 0, 0},{"_p_XmlUpdateContext", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlIndexSpecification[] = {{"_p_XmlIndexSpecification", 0, "XmlIndexSpecification *", &_wrap_class_XmlIndexSpecification, 0, 0, 0},{"_p_XmlIndexSpecification", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlValue[] = {{"_p_XmlValue", 0, "XmlValue *", &_wrap_class_XmlValue, 0, 0, 0},{"_p_XmlValue", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlQueryExpression[] = {{"_p_XmlQueryExpression", 0, "XmlQueryExpression *", &_wrap_class_XmlQueryExpression, 0, 0, 0},{"_p_XmlQueryExpression", 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_DbTxn[] = {{"_p_DbTxn", 0, "DbTxn *", 0, 0, 0, 0},{"_p_DbTxn", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlContainer[] = {{"_p_XmlContainer", 0, "XmlContainer *", &_wrap_class_XmlContainer, 0, 0, 0},{"_p_XmlContainer", 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_XmlModify[] = {{"_p_XmlModify", 0, "XmlModify *", &_wrap_class_XmlModify, 0, 0, 0},{"_p_XmlModify", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlDocument[] = {{"_p_XmlDocument", 0, "XmlDocument *", &_wrap_class_XmlDocument, 0, 0, 0},{"_p_XmlDocument", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlIndexDeclaration[] = {{"_p_XmlIndexDeclaration", 0, "XmlIndexDeclaration *", &_wrap_class_XmlIndexDeclaration, 0, 0, 0},{"_p_XmlIndexDeclaration", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};

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


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

#ifdef __cplusplus
}
#endif

SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
    int i;
    static int _init = 0;
    if (interp == 0) return TCL_ERROR;
    #ifdef USE_TCL_STUBS
    if (Tcl_InitStubs(interp, (char*)"8.1", 0) == NULL) {
        return TCL_ERROR;
    }
    #endif
    
    Tcl_PkgProvide(interp, (char*)SWIG_name, (char*)SWIG_version);
    
    #ifdef SWIG_namespace
    Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
    #endif
    if (!_init) {
        for (i = 0; swig_types_initial[i]; i++) {
            swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
        }
        _init = 1;
    }
    for (i = 0; swig_commands[i].name; i++) {
        Tcl_CreateObjCommand(interp, (char *) swig_commands[i].name, (swig_wrapper_func) swig_commands[i].wrapper, swig_commands[i].clientdata, NULL);
    }
    for (i = 0; swig_variables[i].name; i++) {
        Tcl_SetVar(interp, (char *) swig_variables[i].name, (char *) "", TCL_GLOBAL_ONLY);
        Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_READS | TCL_GLOBAL_ONLY, (Tcl_VarTraceProc *) swig_variables[i].get, (ClientData) swig_variables[i].addr);
        Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_WRITES | TCL_GLOBAL_ONLY, (Tcl_VarTraceProc *) swig_variables[i].set, (ClientData) swig_variables[i].addr);
    }
    SWIG_InstallConstants(interp, swig_constants);
    
    return TCL_OK;
}

