Liquid XML Data Binder (C++, Java, VB6) / Reference / C++ / Reference / CAttributeCol / C++ begin - Collection
In This Topic
    C++ begin - Collection
    In This Topic
    typedef LtXmlLib20::CLtIterator<LtXmlLib20::XXXX> iterator;
    iterator begin();
        Each collection class contains an iterator. The iterator is provided to allow you sequentially move through the contents of the collection. They behave in the same way as stl iterators. Also see end and iterator

    begin() returns the iterator that is at the beginning of the collection.
    It is possible to retrieve an object from this iterator by de-referencing it ie *itr.


    for (CAttribute::iterator itr = spParentElement->GetAttributes()->begin();
             itr != spParentElement->GetAttributes()->end();
            CAttributePtr spAttr = (*itr);
            std::string strName = spAttr->GetName();