|
Boost Users : |
From: Sergio \(euitt-yegui-cho\) (txoko20_at_[hidden])
Date: 2008-08-01 04:36:36
First of all, sorry for my written English.
I would like to know if there is a way in XML Serialization to perform serialization of objects without class_id taking into account that the objects belong to classes that derive from a Base class.
My desired xml files are something like:
<call>
<callrequest>
<number>123456789</number>
</callrequest>
</call>
<call>
<callresponse>
<state>connected</state>
</callresponse>
</call>
So I have a class "Call" that contains a pointer to an object of a class "CallType". That class is abstract, and "CallRequest" and "CallResponse" implement some methods from it.
When I try to serialize the classes , although I specify that want no class_id, object_id, etc., as I have to register the classes , then class_id is always added to xml syntax:
<call class_id="1">
<callrequest class_id="2">
<number>123456789</number>
</callrequest>
</call>
<call class_id="1">
<callresponse class_id="3">
<state>connected</state>
</callresponse>
</call>
Is there a way to serialize objects deriving from other objects without serializing class_ids ? I guess there sould be a way to specify "tag callresponse" is for deserializing class "CallResponse" ...
Thanks a lot.
¿No te gusta tu dirección de correo?
Consigue una que te guste de verdad - millones de direcciones de correo disponibles en Yahoo!
http://es.docs.yahoo.com/mail/nueva_direccion.html
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net