Added XML handling and conversion to SampleData