Re:Re: Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-07-06 Thread jianhua
Thanks Wright; Yes, protostuff has serialize tool for XML, but written by JAVA and my project is native C++. At 2011-06-27 22:15:48,"Ben Wright" wrote: Have you tried http://code.google.com/p/protostuff/ ? -- You received this message because you are subscribed to the Google Groups "Protoc

Re:Re: Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-27 Thread jianhua
Thanks for your quick response. Seems no easy and convenient solution for managed C++ which I mean it isn’t dependent on MS .NET framework. If no such convert plug-in available, boost serialization and TinyXML are all my choice. If using boost, it is intrusive for original class, now I am resp

Re: Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-27 Thread Lars Schouw
Is there something simular for csharp or C++? -- 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/-/WAI3bMes_YoJ. To post to this group, send email to protobuf@go

Re: Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-27 Thread Ben Wright
Have you tried http://code.google.com/p/protostuff/ ? -- 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/-/hTS8SDZLVvgJ. To post to this group, send email to pro

Re: Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-27 Thread Lars Schouw
When you say managed C++ what kind of library are you using? A C++ one? Can't you wrap that in a Managed C++ layer? -- 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/pr

Re:Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-27 Thread jianhua
Thanks Marc Gravell and Lars Schouw response on this issue. Seems the corresponding XML serialization library isn't available for managed C++, so is it impossible to convert a protobuf object to XML so far. I don't know whether google has a plan to write such plug-in and provide method ToXML(

Re: [protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-24 Thread Marc Gravell
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.

[protobuf] Re: Is any method available to convert a protobuf object to XML?

2011-06-24 Thread Lars Schouw
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(); XmlSerializer x = new XmlS