[Boost-bugs] [Boost C++ Libraries] #10810: Property tree XML parser eats whitespace of text elements

Subject: [Boost-bugs] [Boost C++ Libraries] #10810: Property tree XML parser eats whitespace of text elements
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-21 20:15:08


#10810: Property tree XML parser eats whitespace of text elements
------------------------------+---------------------------
 Reporter: ahaferburg@… | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 The trim_whitespace flag converts this XML:

   {{{#!xml
   <yes>

     <sadly>Whitespace matters </sadly>
   </yes>
   }}}

 into this:

   {{{#!xml
   <yes>
     <sadly>Whitespace matters</sadly>
   </yes>
   }}}

 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.

 I believe that the cause is that the boost version of rapidxml combines
 the two flags `parse_trim_whitespace` and `parse_normalize_whitespace`
 into one, `trim_whitespace`.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10810>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC