Add methods to QgsDataDefined for reading and writing to XML