code: @Override
      public void toXML(final Document d, final File f) throws JAXBException,
              IOException {
          FileWriter fw = null;
          try {
              fw = new FileWriter(f);
              fw.write(toXML(d));
          } finally {
              if (fw != null) {
                  fw.close();
              }
          }
      }
docs: {@inheritDoc}