I am trying to read an XML file into a data set using dataset.ReadXml(fileName, XmlReadMode.IgnoreSchema). XML contains data formatted in French eg 231,23 ie '.' in US is replaced by ',' in French. I get an exception Input string was not in a correct format.Can any one help me ?
views:
92answers:
2
A:
While debugging take a look at the value of your dataset.Locale.NumberFormat.NumberDecimalSeperator property -- it is probably '.' by default and you'd want to change it to ',' before reading in the XML.
East of Nowhere
2010-03-17 22:18:20
+1
A:
Set your culture info to fr-FR
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR")
The parsing should not fail.
Karel Frajtak
2010-04-28 15:56:06