The protocol buffer encoding is a binary format. SerializeToString() actually returns a string containing raw bytes, not text. XML doesn't allow you to embed raw bytes into it, so you will have to base-64 encode them.
It's probably better to avoid using XML altogether if you can. Embedding a protocol buffer inside XML sort of defeats the purpose. On Sat, Jan 24, 2009 at 11:52 AM, mmarques <mig.marq...@gmail.com> wrote: > > Hy, > > I'm using protocoll buffers to share data between python and java with > xmlrpc. > > I've implemented a method in python that returns a string that is the > result of invoking, in Python > > object.serializeToString() > > My rpc client while reading the response returns: > > An invalid XML character (Unicode: 0x8) was found in the element > content of the document. > > I guess the problem is that the XML parser doesn't support the > encoding used by protocol buffers to serialize the object. > > Do I need encode it again in (i.e: base64) or am I doing something > wrong? It doesn't seem to appropriate to encode again since it will > introduce some overhead... > > thanks > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---