Helper functions for performing XML Validation, Serialisation and Deserialisation in C#