[protobuf] Serialization of existing XML Type

2012-07-29 Thread Shail
As part of using protocol buffer .Net, I Came across that any XMLType can be directly serilaized, My sample XML Type is : [XmlType] public class Movie { [XmlElement(MovieNameValue, Order = 0)] public string MovieName; [XmlElement(MovieNameValue, Order =

Re: [protobuf] Serialization of existing XML Type

2012-07-29 Thread Marc Gravell
protobuf-net indeed needs *some* way to associate protobuf numbers with members; one of the ways it supports is `[XmlElement(Order=n)]`, but to confirm: yes the n needs to be = 1, and yes, since `[XmlAttribute]` doesn't specify any such number, protobuf-net can't use that in any meaningful way.

Re: [protobuf] Serialization of existing XML Type

2012-07-29 Thread Shail
Thanks Marc...This is what I was looking for...Thanks again for your support and quick reply. On Monday, 30 July 2012 11:04:22 UTC+5:30, Marc Gravell wrote: protobuf-net indeed needs *some* way to associate protobuf numbers with members; one of the ways it supports is