### XmlContainer.close |

`

###

    import com.sleepycat.dbxml.*;

    public void close(int flags)
        throws XmlException;

### Description: XmlContainer.close

The XmlContainer.close method closes the container. The XmlContainer must be open for the call to succeed. The XmlContainer.isOpen method can be used to determine if a given container is currently open or closed. An XmlContainer may be reopened after it has been closed. If multiple threads are using the XmlContainer concurrently, only a single thread may call the XmlContainer.close method.

### Parameters

flags
  Specifies how the XmlContainer is to be closed. Flags may be set to zero or Db.DB_NOSYNC. The Db.DB_NOSYNC flag causes the XmlContainer to be closed without flushing cached information to disk.

### Throws

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

CONTAINER_CLOSED
  The container is already closed.

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.