Problem saving XML Data

  • Thread starter Thread starter barry
  • Start date Start date
B

barry

Hello

Will modifying and saving XML data the copyright character has a additional
character © , my client class it a weired character.

i tried to save the file StreamWriter("xxx.xml", false, Encoding.UTF7 or
UTF8 or ASCII) nothing seems to elimnate the weired character.

can someone help out

TIA
Barry
 
Could you post something that demonstrates this? For example, following
seems fine...

XmlDocument doc = new XmlDocument();
doc.AppendChild(doc.CreateElement("root")).InnerText = "©";
doc.Save(@"c:\my.xml");

Marc
 
This is how my project works

I read an xml file extract some fields and save to a csv file, modify the
csv file in excel and then write back the data to the original xml file
nodes and save the xml nodes to a new file.

Not sure how to post the data here
 
Will modifying and saving XML data the copyright character has a
additional character © , my client class it a weired character.

This is normal in UTF.
Open your XML file with a text editor supporting UTF ...
 
I found that Excel is the culprit, if you create a .csv file with the
copyright character and open the file in excel you will find the weired
character

Remember i am reading back the csv file using OleDb which transfers the
problem to the xml file

In one of my earlier posting i did have such a problem.
 
Back
Top