public static function &GetCategoryPath($iEndNodeId, $iStartNodeId = null, $sLanguageID = null)
    {
        if (null === $sLanguageID) {
            $sLanguageID = self::getLanguageService()->getActiveLanguageId();
        }

        $bDone = false;
        $iCurrentCatId = $iEndNodeId;
        $aTmpList = array(); // we store the list in a tmp array so we can reverse the order
        do {
            $oCategory = TdbShopCategory::GetNewInstance();
            $oCategory->SetLanguage($sLanguageID);
            if (!$oCategory->Load($iCurrentCatId)) {
                $oCategory = null;
                $bDone = true;
            } else {
                $aTmpList[] = $oCategory;
                if (null !== $iStartNodeId && $iStartNodeId == $iCurrentCatId) {
                    $bDone = true;
                } else {
                    $oCategory = $oCategory->GetParent();
                    if (null === $oCategory) {
                        $bDone = true;
                    } else {
                        $iCurrentCatId = $oCategory->id;
                    }
                }
            }
        } while (!$bDone);

        $aTmpList = array_reverse($aTmpList);
        $oCategoryPath = new TIterator();
        foreach (array_keys($aTmpList) as $iTmpIndex) {
            $oCategoryPath->AddItem($aTmpList[$iTmpIndex]);
        }

        return $oCategoryPath;
    }