parsing XML with illegal characters - Loads fine in VB6

the-muppet

New Member
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 exampleVB6 code (this works fine):\[code\]Dim xmlDoc As MSXML.DOMDocumentxmlDoc.Load(XMLfilename)\[/code\]C# code (this throws error 'john' is an unexpected token)\[code\]XmlDocument xmlDoc = new XmlDocument();xmlDoc .Load(XMLfilename);\[/code\]This is an example of row that throws the error: 'Cliff' is an unexpected token. Expecting white space\[code\]<rs:data><z:row ID="1234" ENRODATE="2010-11-12" LastName="Van "Cliff" Anderson" FirstName="Mark" GENDER="MALE"/></rs:data>\[/code\]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?
 
Back
Top