HowTo use XML with in with SugoiTools?

In this part, we will see how to easily use XML in you application. You don not need any XML advenced knowledge and the only thing you realy need to know is that the XML format is composed as following :
          <xml ...>
          <tag1 id="">
                    <tag2>
                    <tag3>
                              <tag4/>
                    <tag3/>
                    <tag5/>
          </tag1>

How to use XML with existing CLASS object from SugoiEngine?


All object that should read/write itself from/to a XML tag must herit from the class



Creating a CL_XML_OBJ:

                    CL_XML_OBJ * XMLTest = new CL_XML_OBJ("tagTest");


Loading a CL_XML_OBJ:
                    //XML tree
                    //<tagRoot>
                    //        <tagTest/>
                    //<tagRoot/>
                    //XMLRoot is a TiXmlElement   * from the library TinyXML and point to the tag <tagRoot> 
                    
                    TiXmlElement        *XML_Test_Tag = XMLTest->XMLLoad(XMLRoot);//return to the XML element of the object tag, so we can used it to read/write data



Saving a CL_XML_OBJ:

                    //XML tree before
                    //<tagRoot/>
                    //XMLRoot is a TiXmlElement   * from the library TinyXML and point to the tag <tagRoot> 
                    
                    TiXmlElement        *XML_Test_Tag = XMLTest->XMLSave(XMLRoot);//return to the XML element of the object tag, so we can used it to read/write data
                    
                    //XML tree after saving
                    //<tagRoot>
                    //        <tagTest/>
                    //<tagRoot/>


The class CL_XML_OBJ has four important definitions???

How to use the XML manager CL_XML_MNGR?


To load/write group of object XML definition of the base type, you may want to use a CL_XML_MNGR

How to use XML with your own objects?


Generated on Mon Mar 19 23:15:11 2007 for SugoiTools by  doxygen 1.4.6-NO