A third party system is sending an XML file having '&' character in data. They are not even using CDATA. (Poorly designed system it is).
In Java, how to read that XML file and escape the & and other special characters (<, >, ", ')?
I know this question has been asked many times, but here we don't have any control over the third party system. So how we can read that "invalid" XML file and make it a valid one?
** I'm not able to use SAX/DOM parser as it considers the input file an invalid one.