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. C#
  4. Any tips for designing and implementing session file formats with C# and XML?

Any tips for designing and implementing session file formats with C# and XML?

Scheduled Pinned Locked Moved C#
csharpvisual-studioxmlquestion
2 Posts 1 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.
  • A Offline
    A Offline
    Arun Bhalla
    wrote on last edited by
    #1

    I'm redesigning the way our application saves and restores sessions. Presently it's serializing using SOAPFormatter, and that's not so good. Most importantly, it's not backwards or forwards compatible. So I want to use XML so that the format is forwards-compatible, and future versions of the application are backwards-compatible with older formats. Does anyone have any tips regarding this? Any good techniques or interfaces to use? XmlDocument vs. XmlWriter/XmlReader? Since some of my data involves Rectangle and Point objects, for instance, and Color objects, too, etc., is there a good way to handle that data without having to handle them specially and write extra code for that? XmlSerializer even seems tantalizing because it might be quick and easy, but I'm afraid that it will be too tied to the internal data representation or class/package structures. Thanks!

    A 1 Reply Last reply
    0
    • A Arun Bhalla

      I'm redesigning the way our application saves and restores sessions. Presently it's serializing using SOAPFormatter, and that's not so good. Most importantly, it's not backwards or forwards compatible. So I want to use XML so that the format is forwards-compatible, and future versions of the application are backwards-compatible with older formats. Does anyone have any tips regarding this? Any good techniques or interfaces to use? XmlDocument vs. XmlWriter/XmlReader? Since some of my data involves Rectangle and Point objects, for instance, and Color objects, too, etc., is there a good way to handle that data without having to handle them specially and write extra code for that? XmlSerializer even seems tantalizing because it might be quick and easy, but I'm afraid that it will be too tied to the internal data representation or class/package structures. Thanks!

      A Offline
      A Offline
      Arun Bhalla
      wrote on last edited by
      #2

      Hmm, maybe Reflection will somehow help me with the System classes.

      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