Click here to Skip to main content
15,886,700 members
Home / Discussions / C#
   

C#

 
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 
QuestionTrying to Copy a changed file to backup folder Pin
Luke Perrin10-Aug-09 9:59
Luke Perrin10-Aug-09 9:59 
AnswerRe: Trying to Copy a changed file to backup folder Pin
DaveyM6910-Aug-09 10:27
professionalDaveyM6910-Aug-09 10:27 
QuestionHow to run C# AND VB.NET applications together? Pin
CoderForEver10-Aug-09 9:30
CoderForEver10-Aug-09 9:30 
AnswerRe: How to run C# AND VB.NET applications together? Pin
Leonardo Muzzi10-Aug-09 9:53
Leonardo Muzzi10-Aug-09 9:53 
GeneralRe: How to run C# AND VB.NET applications together? Pin
CoderForEver10-Aug-09 10:04
CoderForEver10-Aug-09 10:04 
GeneralRe: How to run C# AND VB.NET applications together? Pin
Leonardo Muzzi10-Aug-09 10:16
Leonardo Muzzi10-Aug-09 10:16 
GeneralRe: How to run C# AND VB.NET applications together? Pin
CoderForEver10-Aug-09 22:41
CoderForEver10-Aug-09 22:41 
GeneralRe: How to run C# AND VB.NET applications together? Pin
Not Active10-Aug-09 11:51
mentorNot Active10-Aug-09 11:51 
GeneralRe: How to run C# AND VB.NET applications together? Pin
CoderForEver10-Aug-09 22:53
CoderForEver10-Aug-09 22:53 
QuestionRead traffic from router Pin
tamir90110-Aug-09 7:02
tamir90110-Aug-09 7:02 
Answersorry...SUBJECT CHANGED Pin
CoderForEver10-Aug-09 9:34
CoderForEver10-Aug-09 9:34 
GeneralRe: sorry...SUBJECT CHANGED Pin
stancrm10-Aug-09 11:09
stancrm10-Aug-09 11:09 

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.