Persist BPMN workflow

I have a requirement to persist BPMN workflow. Is there way to do it using GoJS?If so is it possible to persist the data in xml format?

The BPMN sample app reads and writes its models in JSON format, as you can see by looking at the saved JSON files, such as Page Not Found -- Northwoods Software.

You can certainly read and write XML if you like, but we do not have any such code.