Fix: XML Parsing Error due to use of &, < and > characters

This blog talks about issue when using &, < and > in xml file and ways to fix them.

Today I want to discuss about the issue I faced sometime back when I used & character in my XML file.

While running the solution when my XML file loaded/parsed, I got error saying & is not a valid character.
 
After looking for a while, I got a solution that I need to replace & with &amp; and it worked.
 
Below are some other commonly used characters and their supported counterpart in XML.
  • <    -->    &lt;  (XML) 
  • >    -->    &gt;  (XML)
Hope you found this information/fix useful. Please share your comments.
 
Happy coding!