Return the HTML document whose tree of HTML elemnents this hzHtmElem is a part. We start at the current node and follow the parentage all the way back to the base of the tree. Arguments: None Pointer to root node of the tree to which the current node (element) belongs
| Return Type | Function name | Arguments |
|---|---|---|
| hzDocHtml* | hzHtmElem::GetTree | (void) |
Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp
Function Logic:
Function body:
hzDocHtml* hzHtmElem::GetTree (void)
{
// Return the HTML document whose tree of HTML elemnents this hzHtmElem is a part. We start at the current node and follow the parentage all the way back
// to the base of the tree.
//
// Arguments: None
// Returns: Pointer to root node of the tree to which the current node (element) belongs
hzHtmElem* pN ; // Current tree node
if (!m_Parent)
Fatal("hzHtmElem::GetTree. 1. Tag %s (line %d, level %d) has no parent\n", *m_Name, m_nLine, m_nLevel) ;
for (pN = this ; pN->m_nLevel ; pN = pN->Parent()) ;
if (!pN->m_Parent)
Fatal("hzHtmElem::GetTree. 2. Tag %s (line %d, level %d) has no parent\n", *pN->m_Name, pN->m_nLine, pN->m_nLevel) ;
return (hzDocHtml*) pN->Parent() ;
}