> This wouldn't be an issue if patches were XML or JSON

Or MIME, even.