|
Boost Users : |
Subject: [Boost-users] [boost][Serialization] - xml-stylesheet tag not recognized
From: girish hilage (girish_hilage_at_[hidden])
Date: 2011-01-07 00:39:31
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>
<boost_serialization signature="serialization::archive" version="6">
But this gives me below error :
$ ./a.out
terminate called after throwing an instance of 'boost::archive::xml_archive_exception'
what(): unrecognized XML syntax
If I remove the line :
<?xml-stylesheet type="text/xsl" href="XSLTFile.xsl"?>
from demo.xml then it works fine.
Can you please let me know if there is any workaround for this problem?
Currently I am using Fedora Core 13 with boost-serialization-1.41.0-7.fc13.i686.
Is this case handled in latest boost release?
Regards,
Girish
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net