Boost C++ Libraries: Ticket #10854: How to add "class_name" tag into the serialized xml archive? https://svn.boost.org/trac10/ticket/10854 <p> here's my xml archive created by boost.serialization: </p> <p> &lt;s class_id="0" tracking_level="1" version="2" object_id="_0"&gt; </p> <p> i need to add a "class_name" tag like this: </p> <p> &lt;s class_id="0" class_name="bus_schedule" tracking_level="1" version="2" object_id="_0"&gt; </p> <p> please tell me how modify my code, thanks very much! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10854 Trac 1.4.3 power_devil@… Fri, 05 Dec 2014 03:21:35 GMT attachment set https://svn.boost.org/trac10/ticket/10854 https://svn.boost.org/trac10/ticket/10854 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Serialization.rar</span> </li> </ul> Ticket power_devil@… Fri, 05 Dec 2014 03:23:02 GMT attachment set https://svn.boost.org/trac10/ticket/10854 https://svn.boost.org/trac10/ticket/10854 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">demo_save.xml</span> </li> </ul> Ticket power_devil@… Fri, 05 Dec 2014 03:28:40 GMT <link>https://svn.boost.org/trac10/ticket/10854#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10854#comment:1</guid> <description> <p> Replying to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10854" title="#10854: Support Requests: How to add &#34;class_name&#34; tag into the serialized xml archive? (closed: wontfix)">power_devil@…</a>: </p> <blockquote class="citation"> <p> here's my xml archive created by boost.serialization: </p> <p> &lt;s class_id="0" tracking_level="1" version="2" object_id="_0"&gt; </p> <p> i need to add a "class_name" tag like this: </p> <p> &lt;s class_id="0" class_name="bus_schedule" tracking_level="1" version="2" object_id="_0"&gt; </p> <p> please tell me how modify my code, thanks very much! </p> </blockquote> <p> bus_schedule is a user-defined class in serialization.cpp. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 15 Jan 2016 16:35:06 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10854#comment:2 https://svn.boost.org/trac10/ticket/10854#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> I don't see an obvious way to get what you want here. </p> <p> This would be definitely doable, but you'd have to invest some more effort than you might want to. The short version of ow to do this is to create your own version of xml_oarchive and maybe xml_iarchive. These might be just extensions of the current ones created by derivation: </p> <pre class="wiki">class my_xml_oarchive : public xml_archive_impl { // overridden functions }; </pre><p> It's not a lot of work to do, but doing so would require pretty good understanding of the implementation of the serialization library. I can't know how much time that would take. </p> Ticket