Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1038: "<" and ">" should be excaped in xml_oarchive
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-12-03 09:48:05
#1038: "<" and ">" should be excaped in xml_oarchive
--------------------------------------+-------------------------------------
Reporter: r.buergel_at_[hidden] | Owner: ramey
Type: Bugs | Status: reopened
Milestone: To Be Determined | Component: serialization
Version: | Severity: Cosmetic
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Changes (by r.buergel_at_[hidden]):
* status: closed => reopened
* resolution: fixed =>
Comment:
It looks like we're talking about two different things here.
The suggested patch just changed the generated xml from
<b class_id="1" class_name="B<int>" ...>
to
<b class_id="1" class_name="B<int>" ...>
I'm not sure, if class_name="B<int>" is valid XML, but i think so. At
least it is unambiguous, because the angle brackets are enclosed by
quotation marks. So, at a closer look, the xml-parser may be the real
cause of the problem and my patch is more the workaround for this.
The case you are describing above doesn't come from using
"BOOST_CLASS_EXPORT ( B<int> )", but from "ar &
BOOST_SERIALIZATION_BASE_OBJECT_NVP( B<int> )". I added it to my testcase
and at a quick view, that also seems to work for other archive types like
text_archive, but fails for xml_archives. But for that case, the
xml_oarchive fails, not the iarchive. So it is recognized when writing the
serialization, and not until reading it.
I'd like to find a solution here. In the best case, the xml-reader is
fixed to read class_name="B<int>", IF that is valid xml.
But at least, the xml_oarchive should not be able to create archives, that
can't be read by the xml_iarchive.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1038#comment:5>
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:49:57 UTC