Monday, January 14, 2008

Xml Parsing Error

Error Message : An error occurred while parsing EntityName. Line 1, position 164.
Applied To : ASP.NET
Cause : This error was caused by a «&» char.

<root><info title="Research & Development" /></root>

While parsing this xml string, when the «&» char was hit, an exception was thrown with the error message.

Solution : The «&» char must be substituted with a Html Entity:
<root><info title="Research &amp; Development" /></root>