package com.sleepycat.dbxml.examples.gettingStarted;

import java.io.*;

import com.sleepycat.dbxml.*;
import com.sleepycat.db.*;

//Exception handling omitted for clarity


//Very simple program that opens (creates) a container and then
// closes it. See myXmlContainer.java for a more robust example.
class simpleContainer
{
    public static void main(String args[]) throws Throwable
    {
       //Instantiate the container. The container's name is "containerName.dbxml"
       // It is created in the current working directory, and without benefit
       // of a database environment.
       XmlContainer myContainer = new XmlContainer(null, "containerName.dbxml", 0);

       //Container flags. Set such that if the container does not exist, 
       // it is created.
       int CFLAGS = Db.DB_CREATE;

       //Open the container.
       myContainer.open(null, CFLAGS, 0);

       //Close the container.
       myContainer.close(0);
    }

}
