Logo

Programming-Idioms

History of Idiom 104 > diff from v8 to v9

Edit summary for version 9 by Bzzzzzzz:
New D implementation by user [Bzzzzzzz]

Version 8

2016-02-19, 15:02:44

Version 9

2017-07-29, 10:55:43

Idiom #104 Save object into XML file

Write content of object x into file data.xml.

Idiom #104 Save object into XML file

Write content of object x into file data.xml.

Imports
import orange.serialization._;
import orange.serialization.archives._;
import std.file;
Code
auto archive = new XmlArchive!(char);
auto serializer = new Serializer(archive); 
serializer.serialize(x);
write("data.xml", archive.data);
Comments bubble
Using the Orange serializer