code: static void export(String path, List<Queue> queueList, DbConn cnx) throws JqmXmlException
      {
          // Argument tests
          if (path == null)
          {
              throw new IllegalArgumentException("file path cannot be null");
          }
          if (queueList == null || queueList.isEmpty())
          {
              throw new IllegalArgumentException("queue list cannot be null or empty");
          }
          if (cnx == null)
          {
              throw new IllegalArgumentException("database connection cannot be null");
          }
  
          // Create XML document
          Element root = new Element("jqm");
          Document document = new Document(root);
          Element queues = new Element("queues");
          root.addContent(queues);
  
          for (Queue q : queueList)
          {
              Element queue = getQueueElement(q, cnx);
              queues.addContent(queue);
          }
  
          // Done: save the file
          try
          {
              XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());
              out.output(document, new FileOutputStream(path));
          }
          catch (java.io.IOException e)
          {
              throw new JqmXmlException("Coul npot save the XML file", e);
          }
      }
docs: Exports several (given) queues to an XML file.