
Hi,
I am trying to learn how to read an XML file using boost-serialization.
The code snippet of a sample program is as follows :
void restore_schedule(bus_schedule &s, const char * filename)
{
// open the archive
std::ifstream ifs(filename);
assert(ifs.good());
boost::archive::xml_iarchive ia(ifs);
// restore the schedule from the archive
ia >> BOOST_SERIALIZATION_NVP(s);
}
First few lines of demo.xml are as follows :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="XSLTFile.xsl"?>
<!DOCTYPE boost_serialization>