Opened 8 years ago

Last modified 8 years ago

#10240 reopened Bugs

Start tags in XML files are not checked

Reported by: staehr@… Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

The exception boost::archive::xml_archive_exception::xml_archive_tag_mismatch is only thrown when end tag is wrong, start tag may be anything.

See attached example:

<seriobject class_id="0" tracking_level="0" version="0">
	<mem>12</mem>
</seriobject>

is desired,

<mem>12</faulty>

is wrong and noticed as invalid, but

<faulty>12</mem>

is valid, should be invalid, too.

Furthermore, in this special example, if you change the end tag of the root node (here: seriobject) to something else, there is also an exception missing.

Attachments (1)

xml_check_example.cpp (996 bytes ) - added by staehr@… 8 years ago.
Minimal example for missing boost::archive::xml_archive_exception::xml_archive_tag_mismatch

Download all attachments as: .zip

Change History (5)

by staehr@…, 8 years ago

Attachment: xml_check_example.cpp added

Minimal example for missing boost::archive::xml_archive_exception::xml_archive_tag_mismatch

comment:1 by Robert Ramey, 8 years ago

I believe that this happens only on the top level. I had to override the check on the top level because ... - not I forget.

<faulty>12</mem> is valid, should be invalid, too.

Hmm - looks invalid to me also.

RObert Ramey

comment:2 by Robert Ramey, 8 years ago

Resolution: wontfix
Status: newclosed

in reply to:  1 comment:3 by staehr@…, 8 years ago

Replying to ramey:

I believe that this happens only on the top level. I had to override the check on the top level because ... - not I forget.

No, not only on top level. This is documented somewhere indeed, but like you I see no reason in that. (You forgot it? Doesn’t seem to be a good reason ;-)) But nevertheless: The check fails on every level.

<faulty>12</mem> is valid, should be invalid, too.

Hmm - looks invalid to me also.

Ok, once again: Why is this ticket set to wontfix?

comment:4 by staehr@…, 8 years ago

Resolution: wontfix
Status: closedreopened
Note: See TracTickets for help on using tickets.