[Mono-dev] Xml output

Julien De Groote julien.degroote at tremplin-utc.net
Tue Jan 31 12:36:56 EST 2006


Hi

I get weird results when using XmlWriter. The first line contains characters
that don't appear to be legal. 

<EF><BB><BF><?xml version="1.0" encoding="utf-8"?>

I am using mono 1.1.12.1 from gentoo emerge system and mono 1.1.11 binary
package. 
Here is the code I use to write xml : 

     69             // create a xml setting
     70             XmlWriterSettings xmlsettings = new XmlWriterSettings();
     71             xmlsettings.Indent = true;
     72             xmlsettings.CloseOutput = true;
     73
     74             //create the XmlWriter
     75             XmlWriter writer = XmlWriter.Create(file,xmlsettings);
     76
     77             //opens the root element
     78             writer.WriteStartElement("freesettsave");
     79
			[...]
     87
     88             //close the root element
     89             writer.WriteEndElement();
     90
     91             //save is finished, we can close the writer
     92             writer.Close();

Am I doing something wrong ?
Thanks




More information about the Mono-devel-list mailing list