Re: [Boost-bugs] [Boost C++ Libraries] #8095: Invalid XML is produced by write_xml when there is a special character in the key

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8095: Invalid XML is produced by write_xml when there is a special character in the key
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-06-30 09:17:12


#8095: Invalid XML is produced by write_xml when there is a special character in
the key
-------------------------------+----------------------------
  Reporter: martongabesz@… | Owner: Sebastian Redl
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: property_tree
   Version: Boost 1.67.0 | Severity: Problem
Resolution: | Keywords: xml
-------------------------------+----------------------------
Changes (by Gray Wolf <wolf+"https://svn.boost.org"@…>):

 * version: Boost 1.52.0 => Boost 1.67.0

Comment:

 I've hit another edge case today when converting bunch of .info to .xml.
 In my case the issue was empty key (since this is valid in info format):

     "" value

 but produces

     <>value</>

 in xml.

 I think failing the generation with an exception would be best (and only)
 solution. Sure, I can (and do now) re-read the xml after `pt::write_xml()`
 and validate it but feels like unnecessary, since I can't imagine when the
 invalid xml would be actually useful (since not even property_tree can
 read it back, correct?).

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/8095#comment:3>
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 : 2018-06-30 09:23:23 UTC