amit Kumar
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.
By amit Kumar in ASP.NET on May 22 2008
  • Liz Macovei
    Aug, 2008 15

    " 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...

    • 0
  • Liz Macovei
    Aug, 2008 15

    " 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...

    • 0
  • Liz Macovei
    Aug, 2008 15

    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}.

    • 0
  • Liz Macovei
    Aug, 2008 15

    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}.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS