Boost C++ Libraries: Ticket #10810: Property tree XML parser eats whitespace of text elements https://svn.boost.org/trac10/ticket/10810 <p> The trim_whitespace flag converts this XML: </p> <div class="wiki-code"><div class="code"><pre><span class="nt">&lt;yes&gt;</span> <span class="nt">&lt;sadly&gt;</span>Whitespace matters <span class="nt">&lt;/sadly&gt;</span> <span class="nt">&lt;/yes&gt;</span> </pre></div></div><p> into this: </p> <div class="wiki-code"><div class="code"><pre><span class="nt">&lt;yes&gt;</span> <span class="nt">&lt;sadly&gt;</span>Whitespace matters<span class="nt">&lt;/sadly&gt;</span> <span class="nt">&lt;/yes&gt;</span> </pre></div></div><p> While the deletion of whitespace in elements that contain other elements is fine, I would consider it a bug to delete whitespace in elements that contain only text. It wouldn't do this to attributes, so it shouldn't do it to text elements. </p> <p> I believe that the cause is that the boost version of rapidxml combines the two flags <code>parse_trim_whitespace</code> and <code>parse_normalize_whitespace</code> into one, <code>trim_whitespace</code>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10810 Trac 1.4.3