I have a project in which I get xml posted via a hidden form field (data=<xml></xml>). People are entering names like Bill & Sandy Smith. this is coming over as:
<NameInfo><Fami lyName><FamilyN ames>David & Karen</FamilyNames><Su rname>Adams</Surname></FamilyName></NameInfo>
When I try to load this up in a XmlDocument it blows up.
string xmlData = Request.Form["RequestDat a"];
dom.LoadXml(xml Data);
results with this:
"This is an unexpected token. The expected token is 'EndElement'. Line 1, position 1022."
I really don't want to go and put some hack in like replacing any & with a + or something like that. But every diferent way I try to load the string blows up.
--------------------------------
From: Eric Zechman
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>uSYzhMD9w0y by494o3XxHg==</Id>