Hi, I have problem to serialize object XmlElement.
[DataContract]
class Data
{
[DataMember(Order = 20)]
public XmlElement Something { get; set; }
}
This class is not mine, and I can't modify that, but I would like to
serialize it via protobuf. I started with runtime model. Unfortunately
protobuf is not able to work with XmlElement.
In case I can modify this class I would to trick write XmlElement to
string and pass it to protobuf. ( original class has much more member,
so it's worth it)
[ProtoContract]
class Data
{
public XmlElement Something { get; set; }
[ProtoMember(20)]
private string SomethingProto
{ get { return Something.WriteToXmlString(); }
{ set { Something = FromXmlString(value); }
}
Is there possibility to define such conversion/callback on runtime
model? Something like custom serializer for Field.
Thanks,ET
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.