Menu

Tutorial updated

Ellers
2005-10-11
2013-05-20
  • Ellers

    Ellers - 2005-10-11

    All,

    The tutorial has been updated and uploaded to:

    http://software.ellerton.net/tinyxml.html

    I've improved the structure, added some more basic building blocks, put in some stuff about settings/getting attributes and a basic save-C++-objects-to-XML section.

    Lee: I've checked this into CVS already.

    Comments welcome
    Ellers

     
    • DavidA

      DavidA - 2005-10-11

      Hi Ellers

      Thank you very much for updating your tutorial. The original was very useful and helped me get started with TinyXML.

      The updates make it even more useful - especially the section on XML to/from C++ objects. I wish I had had this when I got started. Almost all XML tutorials seem to address the web page designer rather than the engineer who wants to save data as XML.

      A couple of suggestions:

      1) Could you add a section 'Decode C++ state from XML'?

      2) In AppSettings::save(), is the declaration of 'name' missing?

      David

       
      • Ellers

        Ellers - 2005-10-11

        Thanks for the nice words David, much appreciated! I hope the new version is just as useful + more.

        The 'decode' section is the very thing I wanted to finish today but ran out of time. Rest assured that it is not forgotten.

        name: No, although it does look like it - it is a member variable (AKA "field") of the AppSettings class. Usually I like to prefix all member vars with "m_", but my private convention is that if the field is public I don't put that there. I might modify it to be "this->name" because that will be much clearer for the tutorial (though a bit yicky, depending on your code style prefs).

        Ellers

         
    • Lee Thomason

      Lee Thomason - 2005-10-11

      On the tutorial: Thanks Ellers! Nice update.

      On TinyBind: Hasn't been touched since the original import...and yet, 90% activitiy and 300 downloads. Clearly a need and interest there. Eries, any interest in a new version?

      On XML for web pages: pah! I wrote this thing because I got sick of re-writing config file parsers. You mean XML is actually used for something? ;-)

      lee

       
    • Ellers

      Ellers - 2005-10-11

      Hi again

      I had more time tonight than I expected so I finished off the XML to/from C++ state section.

      All feedback welcome...

      http://software.ellerton.net/tinyxml.html

      Ellers

       
  • Anonymous

    Anonymous - 2010-08-02

    hello All,
    just wanted to point out one small error i encountered while using the tutorial.
    in
    "

     void dump_to_stdout( TiXmlNode * pParent, unsigned int indent = 0 )
    {switch ( t )
        {................
        case TiXmlNode::DOCUMENT
    ]:
          .........  
        case TiXmlNode::ELEMENT:
         ..........   
        case TiXmlNode::COMMENT:
         ............   
        case TiXmlNode::UNKNOWN:
         .............   
        case TiXmlNode::TEXT:
         ...........   
        case TiXmlNode::DECLARATION:
    ...............
    }
    

    "

    the enum values are different i.e instead of "DOCUMENT "  its "TINYXML_DOCUMENT"
    e.g
    case TiXmlNode::TINYXML_DOCUMENT
    and so on for the rest of the cases.

     

Log in to post a comment.