Subject: [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: 2013-02-18 16:23:13
#8095: Invalid XML is produced by write_xml when there is a special character in
the key
------------------------------------+---------------------------------------
Reporter: martongabesz@⦠| Owner: cornedbee
Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
Version: Boost 1.52.0 | Severity: Problem
Keywords: xml |
------------------------------------+---------------------------------------
I have the following property tree, dumped in INFO format:
{{{
CudbAppServiceId=1
{
userLabel ""
sqlAppSrvPlSchema identities-pl.sql
CudbAppServiceId CudbAppServiceId=1
}
}}}
When I dump it in XML format, I got the following:
{{{
<?xml version="1.0" encoding="utf-8"?>
<CudbAppServiceId=1>
<userLabel/>
<sqlAppSrvPlSchema>identities-pl.sql</sqlAppSrvPlSchema>
<CudbAppServiceId>CudbAppServiceId=1</CudbAppServiceId>
</CudbAppServiceId=1>
}}}
This is not a valid XML, because we have a tag "CudbAppServiceId=1".
Of course, any other xml parser like xmllint will fail to parse it,
because of the equality sign in the tag.
Is there any solution to this problem? Like somehow emitting =
instead of the raw '=' inside the tag and in the text?
This is a possible problem in 1.53 as well, since property tree was not
updated.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8095> 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:12 UTC