
Robert Ramey wrote:
(I'm particularly interested with XML archives. If I had control over the xml parser, that would simply mean ignoring everything from the current tag until the next matching tag is found).
I believe you do have the control you desire. Here's a sketch:
suppose object A includes memory variables x, y and z
specialize template for xml input archives and type A
void load (boost::archive::xml_iarchive & ia, A & a, const unsigned version){ ia & BOOST_SERIALIZATION_NVP(x); if(version == 1){ // the next data should look like
...</x> // skip over this data using your favorite xml parser - or use the one // that the serialization library uses - built with spirit - note that this // is not exposed by the library and is hidden from users as an // implementation detail } ia & BOOST_SERIALIZATION_NVP(z); }
You didn't answer my question. What I am asking is what do I write in the commented out portion of the code using only Boost.Serialization interface. I do not want to do any undocumented back-door tricks. I want a way to skip reading some data regardless of what the archive type is. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net