#include <userinfo.h>
Public Member Functions | |
RootElement (const char *fileName) | |
attach new RootElement instance to a file (typically with an XML extension) | |
bool | Load (void) |
this method loads root element and all its subnodes from the attached file | |
void | Save (void) |
this method saves all the previsoulsy attached DOMElements into the file | |
operator DOMElement & () | |
this operator allows to use a RootElement instance whenever a DOMElement variable is accepted |
Firstly, you associate new RootElement instance with some filename during a time of its construtcion. Then, you disassembly some object into the new RootElement instance, and save it into the file this way:
CAudi audi; RootElement root("cars.xml"); UserInfo::Disassembly( audi, root, "TT"); root.Save();
In the other way round, when loading object from a XML file, the appropriate code looks like this:
RootElement root("cars.xml"); root.Load(); UserInfo::Assembly<T>(root,"TT");
bool RootElement::Load | ( | void | ) |
this method loads root element and all its subnodes from the attached file
loads root element from a file
This DOMWriter is used to import external data from xml files
void RootElement::Save | ( | void | ) |
this method saves all the previsoulsy attached DOMElements into the file
Save UserInfo to the file (typically with an XML extension).