[boost][Serialization] - xml-stylesheet tag not recognized

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

On Fri, Jan 7, 2011 at 12:39 AM, girish hilage <girish_hilage@yahoo.com>wrote: I am trying to learn how to read an XML file using boost-serialization.
Disclaimer: I haven't yet used Boost.Serialization, but I've read a fair amount about it on this list. Take my remarks for whatever they're worth. That said... I do not believe Serialization was designed as a general-purpose XML parser library. I think I remember Robert saying he wrote a specific Boost.Spirit parser for the subset of XML emitted by Boost.Serialization. In other words, Serialization was designed to read only its own XML files... no one else's. There's mail traffic in the list archives about people's favorite C++ XML parsers. I could Google for it, but then, so can you. Good luck!
participants (2)
-
girish hilage
-
Nat Linden