### XmlContainer.upgrade |

`

###

    import com.sleepycat.dbxml.*;

    public void upgrade(int flags)
        throws XmlException;

### Description: XmlContainer.upgrade

The XmlContainer.upgrade method upgrades the container from a previous version of Berkeley DB XML, or Berkeley DB, to the current version. A Berkeley DB upgrade is first performed using the Db.upgrade method, and then the Berkeley DB XML container is upgraded. If no upgrade is needed, then no changes are made.

Container upgrades are done in place and are destructive. For example, if pages need to be allocated and no disk space is available, the container may be left corrupted. Backups should be made before containers are upgraded. See Upgrading databases for more information.

The container must be closed; the system throws an exception if the container is open.

### Parameters

flags
  Flags must be set to zero.

### Throws

The XmlContainer.upgrade method may fail and throw XmlException, encapsulating one of the following non-zero errors:

CONTAINER_OPEN
  The container is open.

DATABASE_ERROR
  An error occurred in an underlying Berkeley DB database. The XmlException.getDbError method will return the error code for the error.

### Class

XmlContainer, XmlDocument, XmlException, XmlIndexSpecification, XmlQueryContext, XmlQueryExpression, XmlResults, XmlUpdateContext, XmlValue`

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.