It is pretty common to come across a scenario where we have to deal with special characters in XML. Like &, (, ), $, etc. With this fix the < be the only illeagal character.
Let’s take look at one way of fixing it if one does not have any control over the XML being received
So if one were to execute line 4, following XmlException would be thrown: