Matt Schuckmann wrote:
Robert Ramey wrote:
Matt Schuckmann wrote:
Is there a reason why the xml parser for the Serialization library can't handle comments in the xml files? Or was this just an oversight.
lol - ne reason in particular. The xml_iarchive was built to read files created by xml_oarchive. In fact its a little more lenient than this minimum - but not all that much.
Has anybody modified the grammar so that it will work with comments in the xml files?
This would be quite easy to do -- but -- you have to get somewhat familiar with spirit first. This somewhat of a detour but its kind of a fun detour and the total time would be about the same as hacking some other solution.
Good luck.
Thanks Matt S.
I've been working on doing just this and I'm not so sure it's really that easy. Since the Serialization library doesn't use a complete xml grammar (like what is provided on the Spirit examples page) and since it doesn't let Spirit see the entire text it isn't quite as easy as it might seem to make it work. So far I've gotten it to ignore comments before and after most tags but I'm not sure if it'll work in the general case.
OK - truth is I just assumed it wouldn't be all that hard. I started with the the full xml parser and slmed it down so it would compile on all the platforms serialization supports. Then from time to time its been tweaked to correct some error or oversight. My impression is that I love spirit - but it takes getting used to. And sometimes there is easy way to do something that isn't all that obvious to "the rest of us" Robert Ramey