code: public static void main(final String... args) throws Exception {
          if (args.length < 2 || args.length > 3) {
              System.out.println("Usage: XMLSerializer input-TT output.xml");
              System.exit(1);
          }
  
          System.out.print("Serializing '" + args[0] + "' to '" + args[1] + "' ... ");
          final long time = System.currentTimeMillis();
  
          Injector injector =
              Guice.createInjector(new ModuleSetter().setDataFacClass(TreeNodeFactory.class).setMetaFacClass(
                  NodeMetaPageFactory.class).createModule());
          IBackendFactory storage = injector.getInstance(IBackendFactory.class);
          IRevisioning revision = injector.getInstance(IRevisioning.class);
  
          final File target = new File(args[1]);
          target.delete();
          final FileOutputStream outputStream = new FileOutputStream(target);
  
          final StorageConfiguration config = new StorageConfiguration(new File(args[0]));
          Storage.createStorage(config);
          final IStorage db = Storage.openStorage(new File(args[0]));
          Properties props = new Properties();
          props.setProperty(ConstructorProps.STORAGEPATH, target.getAbsolutePath());
          props.setProperty(ConstructorProps.RESOURCE, "shredded");
          db.createResource(new ResourceConfiguration(props, storage, revision, new TreeNodeFactory(),
              new NodeMetaPageFactory()));
          final ISession session = db.getSession(new SessionConfiguration("shredded", StandardSettings.KEY));
  
          final XMLSerializer serializer = new XMLSerializerBuilder(session, outputStream).build();
          serializer.call();
  
          session.close();
          outputStream.close();
          db.close();
  
          System.out.println(" done [" + (System.currentTimeMillis() - time) + "ms].");
      }
docs: Main method.
  
  @param args
  args[0] specifies the input-TT file/folder; args[1] specifies
  the output XML file.
  @throws Exception
  Any exception.