Skip to content

Commit

Permalink
Nowadays, XmlDeclaratoin.WriteTo() writes PI instead of raw.
Browse files Browse the repository at this point in the history
This resulted in invalid output to JsonWriter (via JsonReaderWriterFactory).
  • Loading branch information
Atsushi Eno committed Mar 26, 2011
1 parent 7420834 commit f59aed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mcs/class/System.XML/System.Xml/XmlDeclaration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public override void WriteContentTo (XmlWriter w) {}
public override void WriteTo (XmlWriter w)
{
// This doesn't seem to match up very well with w.WriteStartDocument()
// so writing out custom here.
w.WriteRaw (String.Format ("<?xml {0}?>", Value));
// so writing out PI here. (it used to be WriteRaw)
w.WriteProcessingInstruction ("xml", Value);
}

private int SkipWhitespace (string input, int index)
Expand Down

0 comments on commit f59aed0

Please sign in to comment.