Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Serializing objects using XLM

Serializing objects using XLM

Scheduled Pinned Locked Moved ATL / WTL / STL
c++questioncomxml
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ernesto D
    wrote on last edited by
    #1

    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

    C M E A 4 Replies Last reply
    0
    • E Ernesto D

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • E Ernesto D

        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

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • E Ernesto D

          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

          E Offline
          E Offline
          Ernesto D
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          • E Ernesto D

            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

            A Offline
            A Offline
            Andrew Walker
            wrote on last edited by
            #5

            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.


            E 1 Reply Last reply
            0
            • A Andrew Walker

              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.


              E Offline
              E Offline
              Ernesto D
              wrote on last edited by
              #6

              boost looks VERY interesting, i think ill go with it. Thanks!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups