Added options for serialisation formats.

Andre had suggested options other than just XML.