I am using the ConvertCsvToXML tool in my client application to send data to a webservice. The seperator field is a comma however the last column in csv file is causing a problem.
The name exists with a carriage return line feed in it, how do I avoid this?
The line feed is - "
"
which after research I believe means a new line.
I tried adding it into the seperator fields -
XDocument doc = ConvertCsvToXML(csv, new[] { ",", "
" });
However this does not work, perhaps it doesn开发者_JAVA技巧't allow multiple seperators however I do not know the parameters of the tool.
Any help is much appreciated.
Assuming http://www.codeproject.com/KB/linq/ConvertCsvToXml.aspx (*why do we have to google that?)
XDocument doc = ConvertCsvToXML(csv, new[] { ",", "\n" });
Perhaps you need \r
as well
精彩评论