Illegal XML characters

We are in strange situation either to allow illegal XML characters or to filter out them in flow service receiving web service call. The illegal character “0x0” coming from SAP system in response to RFC call in the same flow service.

In what way we can allow/filter out the unicode/hex characters and what are undesired effects of this code change?