Menu

how get i-th attribute: Attribute() deprectd?

Neal
2006-10-03
2013-05-20
  • Neal

    Neal - 2006-10-03

    Hi.  Ive got some old Tiny XML code, and I need to upgrade it to the current version 2.5.2 so I can use the new methods to save to disk. 

    The old application I have call an obsolete overloaded version of Attribute:

      TiXmlElement::Attribute ( int i; char* c);

    that gets the i-th element.  Apparently that method no longer exists in the current version.

    Can anyone suggest an alternative approach to this functionality?   I dont actually need to get the i-th attribute:  All I really need to do is iterate thru all the attributes of a given element, so I'd be happy with methods to

    - getFirstAttribute() // already exists
    - getNextAttribute() // ?? does this exist.

    Thanks in advance for any help,
      neal

     
    • Neal

      Neal - 2006-10-03

      Never mind:  I think I found the new way to do it:

      Element::FirstAttribute()

      and then

      Attribute::Next();

       
    • Lee Thomason

      Lee Thomason - 2006-10-05

      ...I don't even remember that version. Wow. :)

      lee

       
    • Neal

      Neal - 2006-10-11

      It turns out that "deprecated" method was never in Tiny XML, of course.  The original developer created it and put it into the Tiny XML source code file, so it looked like it was originally there.

       

Log in to post a comment.