X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.XML%2FSystem.Xml%2FXmlDeclaration.cs;h=8f1974e4d9aef7fd34764e2427267795bcf1f5fd;hb=d1eb94eb677b6298c501c470976494a3a29e16df;hp=e1dcf421527bbd175edfae34f7e5ba3402858a5c;hpb=c8e79373543589cf55cf3de331c4047d359300c9;p=mono.git diff --git a/mcs/class/System.XML/System.Xml/XmlDeclaration.cs b/mcs/class/System.XML/System.Xml/XmlDeclaration.cs index e1dcf421527..8f1974e4d9a 100644 --- a/mcs/class/System.XML/System.Xml/XmlDeclaration.cs +++ b/mcs/class/System.XML/System.Xml/XmlDeclaration.cs @@ -89,16 +89,13 @@ namespace System.Xml return new XmlDeclaration (Version, Encoding, standalone, OwnerDocument); } - public override void WriteContentTo (XmlWriter w) - { - // Nothing to do - no children. - } + public override void WriteContentTo (XmlWriter w) {} - [MonoTODO] public override void WriteTo (XmlWriter w) { - if ((Standalone == String.Empty) || (Encoding == String.Empty)) - return; + // This doesn't seem to match up very well with w.WriteStartDocument() + // so writing out custom here. + w.WriteRaw (String.Format ("", Value)); } void ParseInput (string input)