Serializing objects using XLM
-
Hi, is there an "easy" way to save the state of an object to a file without using MFC or COM objects? im working on a WTL project that needs to save and read a special form of "document" to file, (kind of like MFC´s Serialize()), but even tho i have the code to do it in binary mode, i would prefer to do it on XML. The documents are quite large, and consists of other objects containing several arrays of CStrings (WTL:CString that is), and primitives like ints, floats, etc. Is there a Non-MFC, Non-COM related XML parser i could use? thanks! The only stupid question is that one wich is never asked
-
Hi, is there an "easy" way to save the state of an object to a file without using MFC or COM objects? im working on a WTL project that needs to save and read a special form of "document" to file, (kind of like MFC´s Serialize()), but even tho i have the code to do it in binary mode, i would prefer to do it on XML. The documents are quite large, and consists of other objects containing several arrays of CStrings (WTL:CString that is), and primitives like ints, floats, etc. Is there a Non-MFC, Non-COM related XML parser i could use? thanks! The only stupid question is that one wich is never asked
I understand you not using MFC ( what XML parser uses MFC anyhow ? ), but why not COM ? Do you want to avoid a dependancy ? I'll admit that I was annoyed recently to find that my video jukebox program needs IE5 for MSXML because I used openXML in a single database query. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
Hi, is there an "easy" way to save the state of an object to a file without using MFC or COM objects? im working on a WTL project that needs to save and read a special form of "document" to file, (kind of like MFC´s Serialize()), but even tho i have the code to do it in binary mode, i would prefer to do it on XML. The documents are quite large, and consists of other objects containing several arrays of CStrings (WTL:CString that is), and primitives like ints, floats, etc. Is there a Non-MFC, Non-COM related XML parser i could use? thanks! The only stupid question is that one wich is never asked
Ernesto D. wrote: Is there a Non-MFC, Non-COM related XML parser i could use? I've never used it myself, but Expat is pretty popular. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD
-
Hi, is there an "easy" way to save the state of an object to a file without using MFC or COM objects? im working on a WTL project that needs to save and read a special form of "document" to file, (kind of like MFC´s Serialize()), but even tho i have the code to do it in binary mode, i would prefer to do it on XML. The documents are quite large, and consists of other objects containing several arrays of CStrings (WTL:CString that is), and primitives like ints, floats, etc. Is there a Non-MFC, Non-COM related XML parser i could use? thanks! The only stupid question is that one wich is never asked
thanks for your answers, to be honest, i dont wanna include COM simply because i dont know how to use it (blushes). I dont know about interfaces and that stuff. But lets say that the only thing off-limits would be MFC (COM is OK), which parser you guys reccomend?
-
Hi, is there an "easy" way to save the state of an object to a file without using MFC or COM objects? im working on a WTL project that needs to save and read a special form of "document" to file, (kind of like MFC´s Serialize()), but even tho i have the code to do it in binary mode, i would prefer to do it on XML. The documents are quite large, and consists of other objects containing several arrays of CStrings (WTL:CString that is), and primitives like ints, floats, etc. Is there a Non-MFC, Non-COM related XML parser i could use? thanks! The only stupid question is that one wich is never asked
How about using a serialization library? Boost::Serialization supports text, binary and xml as output targets, and is pretty simple to use. TinyXml Is a nice small library that has picked up a fair ammount of popularity. Xerces To my way of thinking was pretty bloated, but if you need your output to support almost everything in the XML standard (especially different encoding schemes) this is the way to go.
-
How about using a serialization library? Boost::Serialization supports text, binary and xml as output targets, and is pretty simple to use. TinyXml Is a nice small library that has picked up a fair ammount of popularity. Xerces To my way of thinking was pretty bloated, but if you need your output to support almost everything in the XML standard (especially different encoding schemes) this is the way to go.