aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/Serialization/XmlFormatWriter.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-06-11 10:41:57 -0500
committerrogerk <devnull@localhost>2011-06-11 10:41:57 -0500
commitf292523df9d3a754e496f90bc26c0995a1d332a4 (patch)
treefba719d05650571b8f7f62bbe6bbcb8ff0032244 /src/ProtocolBuffers/Serialization/XmlFormatWriter.cs
parent7fc785c1d463c4424cf3e3c8d7fbe796e0197b70 (diff)
downloadprotobuf-f292523df9d3a754e496f90bc26c0995a1d332a4.tar.gz
protobuf-f292523df9d3a754e496f90bc26c0995a1d332a4.tar.bz2
protobuf-f292523df9d3a754e496f90bc26c0995a1d332a4.zip
Added convenience methods for to/from xml and json
Diffstat (limited to 'src/ProtocolBuffers/Serialization/XmlFormatWriter.cs')
-rw-r--r--src/ProtocolBuffers/Serialization/XmlFormatWriter.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ProtocolBuffers/Serialization/XmlFormatWriter.cs b/src/ProtocolBuffers/Serialization/XmlFormatWriter.cs
index 2bb4f159..1be2f390 100644
--- a/src/ProtocolBuffers/Serialization/XmlFormatWriter.cs
+++ b/src/ProtocolBuffers/Serialization/XmlFormatWriter.cs
@@ -20,7 +20,13 @@ namespace Google.ProtocolBuffers.Serialization
static XmlWriterSettings DefaultSettings(Encoding encoding)
{
- return new XmlWriterSettings() { CheckCharacters = false, NewLineHandling = NewLineHandling.Entitize, Encoding = encoding };
+ return new XmlWriterSettings()
+ {
+ CheckCharacters = false,
+ NewLineHandling = NewLineHandling.Entitize,
+ OmitXmlDeclaration = true,
+ Encoding = encoding,
+ };
}
/// <summary>