| Return Type | Function name | Arguments |
|---|---|---|
| unsigned int | hzDocHtml::ExtractLinksContent | (hzMapS<hzUrl,hzString>&,const hzSet<hzString>&,const hzString&,) |
Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp
Function Logic:
Function body:
unsigned int hzDocHtml::ExtractLinksContent (hzMapS<hzUrl,hzString>& links, const hzSet<hzString>& domains, const hzString& criteria)
{
hzHtmElem* pElement ;
hzAttrset ai ;
hzString anam ;
hzString S ;
hzUrl link ;
uint32_t nIndex ;
links.Clear() ;
for (nIndex = 0; nIndex < m_vecTags.Count() ; nIndex++)
{
pElement = m_vecTags[nIndex] ;
if (pElement->Type() != HTAG_ANCHOR)
continue ;
for (ai = pElement ; ai.Valid() ; ai.Advance())
{
anam = ai.Name() ;
if (anam.Equiv("href"))
{
link = ai.Value() ;
if (!link)
continue ;
if (domains.Count())
{
if (!domains.Exists(link.Domain()))
continue ;
}
if (criteria)
{
if (!FormCheckCstr(*link, *criteria))
continue ;
}
S = pElement->m_tmpContent ;
links.Insert(link, S) ;
}
}
}
return links.Count() ;
}