Answering my own question. What I found is that I can do this as the last line in the mentioned example from the User Guide and I will get the XML for the Process.
System.out.println(XmlBPMNProcessDumper.INSTANCE.dump(process, XmlBPMNProcessDumper.NO_META_DATA));