Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 28th, 2006, 02:55 PM
NN
Guest
 
Posts: n/a
Default Problem with XmlDocument

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=ISO-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.

Someone can help me?



  #2  
Old February 28th, 2006, 03:45 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Problem with XmlDocument



NN wrote:

[color=blue]
> I have a file xml with "encoding=ISO-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"[/color]

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
http://JavaScript.FAQTs.com/
  #3  
Old March 1st, 2006, 12:25 PM
NN
Guest
 
Posts: n/a
Default Re: Problem with XmlDocument

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...[color=blue]
>
>
> NN wrote:
>
>[color=green]
> > I have a file xml with "encoding=ISO-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[/color][/color]
in[color=blue][color=green]
> > mscorlib.dll"
> >
> > "Additional information: Not valid byte in the index byte 1143"[/color]
>
> 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
> http://JavaScript.FAQTs.com/[/color]


  #4  
Old March 1st, 2006, 01:55 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Problem with XmlDocument


NN wrote:
[color=blue]
> No, if i open it en IE there isn't a problem. IE opens it well. That's the
> strange.[/color]

Can you upload the XML somewhere and post a URL?

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles