try { XmlManager mgr( DBXML_ALLOW_EXTERNAL_ACCESS); // flag is for validation XmlContainer cont =mgr.openContainer( "clientlog.dbxml", DB_CREATE | DBXML_ALLOW_VALIDATION, XmlContainer::WholedocContainer); XmlDocument newdoc =mgr.createDocument(); XmlUpdateContext uc =mgr.createUpdateContext(); XmlInputStream *in =mgr.createStdInInputStream(); newdoc.setContentAsXmlInputStream( in); cont.putDocument(newdoc, uc, DBXML_GEN_NAME); ...