The code shown uses XmlSerializer - it doesn't use protobuf-net at all. protobuf-net does tend to be friendly towards this, however you would:
- deserialize with protobuf-net into objects - serialize with XmlSerializer The only point of co tact between the two is the object model in the middle. On 24 Jun 2011, at 16:29, Lars Schouw <sch...@gmail.com> wrote: > 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; > Serializer.PrepareSerializer<Test>(); > > 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);c > } > } > 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 > https://groups.google.com/d/msg/protobuf/-/E_KNwOPbenoJ. > To post to this group, send email to protobuf@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.