I am trying to load XML files which were generated in VB6 application using ADODB into .Net application. Some of theses XMl files contain invalid characters that throws error on .Net side but loads perfectly fine via the original VB6 application. For example
VB6 code (this works fine):
Dim xmlDoc As MSXML.DOMDocument
xmlDoc.Load(XMLfilename)
C# code (this throws error 'john' is an unexpected token)
XmlDocument xmlDoc = new XmlDocument();
xmlDoc .Load(XMLfilename);
This is an example of row that throws the error: 'Cliff' is an unexpected token. Expecting white space
<rs:data>
<z:row ID="1234" ENRODATE="2010-11-12" LastName="Van "Cliff" Anderson" FirstName="Mark" GENDER="MALE"/>
</rs:data>
I do understand the above is not a valid XML but VB6 accepts this with no issue. Is there anyway to deal with problem like this?