docs: public void saveAsSVG(File file) throws IOException, TransformerFactoryConfigurationError, TransformerException {
      OutputStream out = new BufferedOutputStream(new FileOutputStream(file));
      // TODO embed linked images.
      javax.xml.transform.Result result = new StreamResult(out);
      SVGDocument doc = cloneDocument();
      // Use a transformer for pretty printing
      Transformer xformer = TransformerFactory.newInstance().newTransformer();
      xformer.setOutputProperty(OutputKeys.INDENT, "yes");
      xformer.transform(new DOMSource(doc), result);
      out.flush();
      out.close();
    }