Home All Groups Group Topic Archive Search About
Author
18 Oct 2007 10:54 PM
vovan
I'm using DataSet.ReadXML method to populate the dataset with data from XML
file.
If one of the values contains apostrophe (for instance: It's something) then
an error occures:
System.Xml.XmlException: Invalid character in the given encoding.
Is this a bug or what? I wouldn't want to parse an XML created by another
program which is using the same ADO.NET for creating the file. On that side
apostrophe is allowed.

Thank you
vovan

Author
19 Oct 2007 1:44 PM
Martin Honnen
vovan wrote:
> I'm using DataSet.ReadXML method to populate the dataset with data from XML
> file.
> If one of the values contains apostrophe (for instance: It's something) then
> an error occures:
> System.Xml.XmlException: Invalid character in the given encoding.
> Is this a bug or what?

Can you post the URL of that XML document? There seems to something
wrong with the way the document encodes its characters.


--

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/
Author
20 Oct 2007 11:58 AM
vovan
I found out that I cannot open that file in Internet Explorer either.
It says "An invalid character was found in a text content." I opened it in
Notepad and see there the character which looks like comma, but it's on the
place of apostrophe. I even cannot find it on my keyboard. Probably it's a
special character and it is not supported by XML. I need to find out what is
it and how it was entered by the user.

Thank you
vovan

Show quote
"Martin Honnen" <mahotr***@yahoo.de> wrote in message
news:uQbDjYlEIHA.1184@TK2MSFTNGP04.phx.gbl...
> vovan wrote:
>> I'm using DataSet.ReadXML method to populate the dataset with data from
>> XML file.
>> If one of the values contains apostrophe (for instance: It's something)
>> then an error occures:
>> System.Xml.XmlException: Invalid character in the given encoding.
>> Is this a bug or what?
>
> Can you post the URL of that XML document? There seems to something wrong
> with the way the document encodes its characters.
>
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/

AddThis Social Bookmark Button