Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
QuestionCombobox Control Pin
elci10-Aug-09 20:33
elci10-Aug-09 20:33 
AnswerRe: Combobox Control Pin
padmanabhan N10-Aug-09 22:33
padmanabhan N10-Aug-09 22:33 
QuestionProblem in using namespace in c# Pin
DIPAK@EMSYS10-Aug-09 20:16
DIPAK@EMSYS10-Aug-09 20:16 
AnswerRe: Problem in using namespace in c# Pin
SeMartens10-Aug-09 20:21
SeMartens10-Aug-09 20:21 
GeneralRe: Problem in using namespace in c# Pin
DIPAK@EMSYS10-Aug-09 21:34
DIPAK@EMSYS10-Aug-09 21:34 
GeneralRe: Problem in using namespace in c# Pin
Henry Minute11-Aug-09 0:29
Henry Minute11-Aug-09 0:29 
GeneralRe: Problem in using namespace in c# Pin
DIPAK@EMSYS11-Aug-09 17:57
DIPAK@EMSYS11-Aug-09 17:57 
QuestionDateTimePicker Pin
elci10-Aug-09 20:03
elci10-Aug-09 20:03 
AnswerRe: DateTimePicker Pin
dan!sh 10-Aug-09 20:35
professional dan!sh 10-Aug-09 20:35 
QuestionHow To change the path of "user.config" Pin
shaktisinh10-Aug-09 19:25
shaktisinh10-Aug-09 19:25 
QuestionHow can I add .Net framework along with setup project Pin
Milind Panchal10-Aug-09 19:20
Milind Panchal10-Aug-09 19:20 
AnswerRe: How can I add .Net framework along with setup project Pin
dan!sh 10-Aug-09 19:24
professional dan!sh 10-Aug-09 19:24 
Questionfiltering Bulk data Pin
333soori10-Aug-09 18:53
333soori10-Aug-09 18:53 
AnswerRe: filtering Bulk data Pin
Toshiya TSURU10-Aug-09 20:09
Toshiya TSURU10-Aug-09 20:09 
QuestionWindows Installer Patch Pin
Sifar - 010-Aug-09 18:32
Sifar - 010-Aug-09 18:32 
Questionexcutable project Pin
masoudshao10-Aug-09 17:58
masoudshao10-Aug-09 17:58 
AnswerRe: excutable project Pin
dan!sh 10-Aug-09 18:26
professional dan!sh 10-Aug-09 18:26 
AnswerRe: excutable project Pin
Saksida Bojan10-Aug-09 22:27
Saksida Bojan10-Aug-09 22:27 
AnswerRe: excutable project Pin
senguptaamlan10-Aug-09 22:43
senguptaamlan10-Aug-09 22:43 
QuestionXml Problem Pin
Saksida Bojan10-Aug-09 10:11
Saksida Bojan10-Aug-09 10:11 
Hello, I have problem reaading XML file using XmlReader. Here is a snipset

StringReader sr = new StringReader(SettingFile);
XmlReaderSettings xrs = new XmlReaderSettings();
xrs.IgnoreWhitespace = true;
xrs.IgnoreComments = true;

XmlReader reader = XmlReader.Create(sr, xrs);

while (reader.Read()) // XmlExpection Here: Data at the root level is invalid. Line 1, position 1.
{
                
}

reader.Close();
sr.Close();


That expection is so funny, because the xml is properly used. or shoud i say even it was created by XmlWriter. Here is what it looks like:


<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <!--This file have strict case sensative info. Edit at your own risk!-->
  <Profiles>
    <profile ID="23867ee9a2044c5d899ae654c17e8def" Name="Test" WorkingPath="">
      <Plugins />
    </profile>
  </Profiles>
</Settings>


this is how i saved that xml.
 XmlWriterSettings xws = new XmlWriterSettings();
xws.Encoding = Encoding.UTF8;
xws.Indent = true;
XmlWriter xw = XmlWriter.Create(SettingFile, xws);


This line was shown by Total Commander without encoding
<?xml version="1.0" encoding="utf-8"?


So how shoud i solve this problem? I want to use XmlWriter, because it doesn't cache in memory.
Thanks in advance
AnswerRe: Xml Problem Pin
Ennis Ray Lynch, Jr.10-Aug-09 10:44
Ennis Ray Lynch, Jr.10-Aug-09 10:44 
GeneralRe: Xml Problem Pin
Saksida Bojan10-Aug-09 10:48
Saksida Bojan10-Aug-09 10:48 
GeneralRe: Xml Problem Pin
harold aptroot10-Aug-09 11:10
harold aptroot10-Aug-09 11:10 
AnswerRe: Xml Problem Pin
PIEBALDconsult10-Aug-09 11:32
mvePIEBALDconsult10-Aug-09 11:32 
GeneralRe: [Solved] Xml Problem [modified] Pin
Saksida Bojan10-Aug-09 19:45
Saksida Bojan10-Aug-09 19:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.