I'm using JGraphx, and I want to put export graph to an SVG file.
I tried
Document document = (Document) mxCellRenderer.createSvgDocument(safetyTreeGraph, null, 1, Color.WHITE, null);
, but I don't know how to output that SVG document to local. So What should I do next?
Asked
Active
Viewed 587 times
1

Andrew Thompson
- 168,117
- 40
- 217
- 433

lution
- 81
- 12
-
2Probably [this](https://stackoverflow.com/questions/4561734/how-to-save-parsed-and-changed-dom-document-in-xml-file) will help you. Simply switch the extension to "svg" and write your `Document` into a file. – Sergiy Medvynskyy Jun 24 '18 at 11:46
-
Great!!! It works!!! Thanks!! – lution Jun 24 '18 at 12:39