all groups > visual studio .net general > february 2006 >
You're in the

visual studio .net general

group:

Problem with XmlDocument


Problem with XmlDocument NN
2/28/2006 11:47:24 AM
visual studio .net general: Before that nothing I want to ask for excuses for my english level.

The problem that I have is the following one:

I have a file xml with "encoding=3DISO-8859-1" and accents.

When in VB.NET, in a Form I write:

Dim objxml as new XmlDocument

and then when de Forms load:

objxml.Load("C\....")

The debugger gives me the following error:

"A first chance exception of type 'System.ArgumentsException' occurred =
in
mscorlib.dll"

"Additional information: Not valid byte in the index byte 1143"

1143 is where the accent is.

Re: Problem with XmlDocument Martin Honnen
2/28/2006 4:34:18 PM


[quoted text, click to view]


[quoted text, click to view]

What happens if you load that XML document inside of IE? Does it
complain about invalid characters/bytes too?

Then the XML is not well-formed, any XML parser will complain if it
finds bytes that don't fit the declared encoding.


--

Martin Honnen --- MVP XML
Re: Problem with XmlDocument NN
3/1/2006 12:00:00 AM
No, if i open it en IE there isn't a problem. IE opens it well. That's the
strange.

"Martin Honnen" <mahotrash@yahoo.de> escribió en el mensaje
news:%23jSj0xHPGHA.3936@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

Re: Problem with XmlDocument Martin Honnen
3/1/2006 2:42:14 PM

[quoted text, click to view]

Can you upload the XML somewhere and post a URL?

--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button