There's nothing built-in to do this, you'll have to traverse all of the data in the model and write out the XML you'd like using something like QXmlStreamWriter.