J
Jim Williams
**** Post for FREE via your newsreader at post.usenet.com ****
I'm working on a 3d engine system.
I need to save/load data in the systems objects to/from XML files.
When I say objects, I mean C++ objects. (These generally correspond to
scene objects, but that consideration isn't important as far as
loading/saving goes.)
I think I have a reasonable grasp of XML, it's method of data
representation, and parsing XML files.
(At the moment I'm looking at using the expat XML parser for it's
callback based system, so I don't have to load/parse the whole -
potentially v large - XML file into memory before I create objects).
The problem I'm having is deciding how to get the data from the XML
parser into the C++ objects.
How is this normally done?
Do you pass the completed/parsed XML node to the C++ object creator?
Do you create the object object and set it's members with data from
the completed/parsed XML node?
What's the best/most flexible way to do this, or are what are pros and
cons of various methods?
Pointers to some examples would be greatly appreciated.
Thanks
Jim Williams
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I'm working on a 3d engine system.
I need to save/load data in the systems objects to/from XML files.
When I say objects, I mean C++ objects. (These generally correspond to
scene objects, but that consideration isn't important as far as
loading/saving goes.)
I think I have a reasonable grasp of XML, it's method of data
representation, and parsing XML files.
(At the moment I'm looking at using the expat XML parser for it's
callback based system, so I don't have to load/parse the whole -
potentially v large - XML file into memory before I create objects).
The problem I'm having is deciding how to get the data from the XML
parser into the C++ objects.
How is this normally done?
Do you pass the completed/parsed XML node to the C++ object creator?
Do you create the object object and set it's members with data from
the completed/parsed XML node?
What's the best/most flexible way to do this, or are what are pros and
cons of various methods?
Pointers to some examples would be greatly appreciated.
Thanks
Jim Williams
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=