CAlbumFolder* CAlbumFolder::GetTarget(CSchemaMember* pMember, LPCTSTR pszValue) const { if ( m_pSchema == pMember->m_pSchema ) { if ( pszValue == NULL ) { return (CAlbumFolder*)this; } else if ( m_pXML != NULL ) { CString strValue = pMember->GetValueFrom( m_pXML, NULL, TRUE ); CXMLNode::UniformString( strValue ); if ( strValue.CompareNoCase( pszValue ) == 0 ) return (CAlbumFolder*)this; } } for ( POSITION pos = GetFolderIterator() ; pos ; ) { CAlbumFolder* pCheck = GetNextFolder( pos ); CAlbumFolder* pResult = pCheck->GetTarget( pMember, pszValue ); if ( pResult ) return pResult; } return NULL; }