Yes, for example in C# you can do like this to create an XPathDocument using 
the protobuf-net lib.

public static XPathDocument Serialize(ProtocolBufferMesage msg)
            XPathDocument xmlDoc = null;

            XmlSerializer x = new XmlSerializer(msg.GetType());
            using (MemoryStream memoryStream = new MemoryStream())
                using (TextWriter w = new StreamWriter(memoryStream))
                    x.Serialize(w, msg);
                    memoryStream.Position = 0;
                    xmlDoc = new XPathDocument(memoryStream);
            return xmlDoc;

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to