Logo Search packages:      
Sourcecode: lame version File versions  Download package

TiXmlNode * TiXmlNode::IterateChildren ( TiXmlNode previous ) const [inherited]

The last child of this node matching 'value'. Will be null if there are no children.

An alternate way to walk the children of a node. One way to iterate over nodes is:

			for( child = parent->FirstChild(); child; child = child->NextSibling() )

IterateChildren does the same thing with the syntax:

			child = 0;
			while( child = parent->IterateChildren( child ) )

IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done.

Definition at line 262 of file tinyxml.cpp.

References TiXmlNode::NextSibling().

      if ( !previous )
            return FirstChild();
            assert( previous->parent == this );
            return previous->NextSibling();

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index