public static void save(History history)
  {
    Document doc = new DocumentImpl();
    Element root = doc.createElement(HISTORY);
    doc.appendChild(root);
    if (history.items != null)
    {
      for (int i = 0; i < history.items.size(); i++)
      {
        History hXSD = (History)history.items.get(i);
        Element eXSD = doc.createElement(XSD_DOC);
        eXSD.setAttribute(FILE, hXSD.path);
        root.appendChild(eXSD);
        if (hXSD.items == null)
          continue;
        for (int j = 0; j < hXSD.items.size(); j++)
        {
          History hXML = (History)hXSD.items.get(j);
          Element eXML = doc.createElement(XML_DOC);
          eXML.setAttribute(FILE, hXML.path);
          eXSD.appendChild(eXML);
        }
      }
    }
    File file = new File(HISTORY_FILE_NAME);
    FileOutputStream out = null;
    try {
      file.createNewFile();
      out = new FileOutputStream(file);
      OutputFormat format = new OutputFormat(doc, "UTF-8", true);
      Writer writer = new OutputStreamWriter(out);
      XMLSerializer serial = new XMLSerializer(writer, format);
      serial.asDOMSerializer();
      serial.serialize(doc);
    } catch (Exception ex) {
    } finally {
      try { out.close(); } catch (Exception ignore) {}
    }
  }