forum

Home / DeveloperSection / Forums / Read xml as a string

Read xml as a string

Anonymous User 1789 27-Jan-2014

I have an xml file which i need to read and store it as a string.

Below is my content in xml.

<list>
<SlideShow id="12523" languageadded="sv" publish="1">
 <name language="sv">Ann-Marie från SWE</name>
</SlideShow>
</list>
And i am using below code to read,
FileStream fStream = new FileStream(path);
StreamReader sr = new StreamReader(fStream);
ItemController.cacheTG = sr.ReadToEnd();
sr.Close();
fStream.Close();

But when i read tghe special character in the name field "Ann-Marie från SWE" converts to Ann-Marie fr?n SWE. How to read the xml without changing special characters.


c# c# 
Updated on 27-Jan-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By