Boost C++ Libraries: Ticket #10527: boost serialization library not able to deserialized shorter xml tag https://svn.boost.org/trac10/ticket/10527 <div class="wiki-code"><div class="code"><pre><span class="nt">&lt;Info</span> <span class="na">class_id=</span><span class="s">&quot;0&quot;</span> <span class="na">tracking_level=</span><span class="s">&quot;0&quot;</span> <span class="na">version=</span><span class="s">&quot;0&quot;</span><span class="nt">&gt;</span> <span class="nt">&lt;value&gt;</span>0<span class="nt">&lt;/value&gt;</span> <span class="nt">&lt;symbol/&gt;</span> <span class="nt">&lt;/Info&gt;</span> </pre></div></div><p> Boost::serialization is not able to deserialize above XML. It throws exception with message "input stream error". </p> <p> Actual XML generated by boost::serialization is </p> <div class="wiki-code"><div class="code"><pre><span class="nt">&lt;Info</span> <span class="na">class_id=</span><span class="s">&quot;0&quot;</span> <span class="na">tracking_level=</span><span class="s">&quot;0&quot;</span> <span class="na">version=</span><span class="s">&quot;0&quot;</span><span class="nt">&gt;</span> <span class="nt">&lt;value&gt;</span>0<span class="nt">&lt;/value&gt;</span> <span class="nt">&lt;symbol&gt;&lt;/symbol&gt;</span> <span class="nt">&lt;/Info&gt;</span> </pre></div></div><p> I passed this XML to queue and received this XML by other application. In between queue tool shorten the empty XML tag. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10527 Trac 1.4.3 Robert Ramey Tue, 23 Sep 2014 15:53:50 GMT status, type changed; resolution set https://svn.boost.org/trac10/ticket/10527#comment:1 https://svn.boost.org/trac10/ticket/10527#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> The xml parser used by the boost serialization library is guarenteed only to be able to parse output by the serialization library itself. So the syntax </p> <p> &lt;symbol/&gt; </p> <p> Is not legal. </p> <p> Regarding the larger subject - Editing XML files produced by the serialization library. This is an interesting subject - but in no way a trivial one. If someone were interested in this, he could make a different xml archive which would include emitting a DTD or xml schema which might make it more "editable". But currently this is considered beyond the scope of the serialization library. </p> Ticket