I'm consuming a web service using the RestSharp library. I don't have any control over the web-service implementation as it is a third-party (Taleo Business Edition).
My issue is that there is some bad data which contains invalid characters. A lot of this data is copy/pasted from documents and I can't force the users to go back and clean this up. It doesn't help that the bad character is an invisible control code (0x01).
The only solution I can think of is to add a pre-processing step before RestSharp attempts to deserialize the XML. I would really like to avoid writing my own XML deserializer.
I've looked at extending the XmlSerializer class but it doesn't seem that any of the virtual methods would be useful for adding in this pre-processing step.
I've also looked at trying to use the OnBeforeDeserializing event in the RestSharp library but I don't see what I could do there that would allow me to pre-process the XML.
I feel like I'm missing something basic here because it seems like something that would be a common use-case for consuming a RESTful web service.