4
Reply

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.

amit Kumar

amit Kumar

16y
8.4k
0
Reply

    " Apostrophes are special characters in XML; you need to replace them with the string ' " I'm desperately trying to write & apos ; instead of '; it didn't work and there's no way I found to edit (or preview, for that matter. Hopefully spaces will give the proper output. Someone with better skills erase my shame...

    " Apostrophes are special characters in XML; you need to replace them with the string ' " I'm desperately trying to write & apos ; instead of '; it didn't work and there's no way I found to edit (or preview, for that matter. Hopefully spaces will give the proper output. Someone with better skills erase my shame...

    Apostrophes are special characters in XML; you need to replace them with the string ' (the same goes for <, >, &, ") There is a method that does the replacing for you, but I don't remember what it's called or where to look for it; if I find it, I'll {edit|post}.

    Apostrophes are special characters in XML; you need to replace them with the string ' (the same goes for <, >, &, ") There is a method that does the replacing for you, but I don't remember what it's called or where to look for it; if I find it, I'll {edit|post}.