Problem saving XML Data

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
 
M

Marc Gravell

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
 
B

barry

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
 
S

SoftLion

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

barry

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top