Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #104 Save object into XML file

Write the contents of the object x into the file data.xml.

import orange.serialization._;
import orange.serialization.archives._;
import std.file;
auto archive = new XmlArchive!(char);
auto serializer = new Serializer(archive); 
serializer.serialize(x);
write("data.xml", archive.data);

Using the Orange serializer

New implementation...
< >
programming-idioms.org