Return the cell from the supplied row and column. Method is to move thru the table's <tr> subnodes to get to the row, then move thur that row's <td> (or equivelent) tags to get to the column within the row (the cell).
| Return Type | Function name | Arguments |
|---|---|---|
| hzString | hzHtmTbl::GetCell | (uint32_t,uint32_t,) |
Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp
Function Logic:
Function body:
hzString hzHtmTbl::GetCell (uint32_t nRow)uint32_t nCol,
{
// Return the cell from the supplied row and column.
//
// Method is to move thru the table's <tr> subnodes to get to the row, then move thur that row's <td> (or equivelent) tags to get to the column within the row (the cell).
//
// Arguments: 1) nRow The row number
// 2) nCol The column number
//
// Returns: Instance of hzString by value - of the table cell
hzHtmElem* pR ; // Table row tags
hzHtmElem* pC ; // Columns
hzString S ; // Target string
uint32_t row = -1; // Row counter
uint32_t col = 0; // Column counter
if (!m_Children) { S = "No child nodes" ; return S ; }
if (!m_nCols) { S = "No columns" ; return S ; }
for (pR = GetFirstChild() ; row <&eq; nRow && pR ; row++, pR = pR->Sibling())
{
if (row < nRow)
continue ;
for (pC = pR->GetFirstChild() ; col <&eq; nCol && pC ; col++, pC = pC->Sibling())
{
if (col < nCol)
continue ;
S = pC->m_tmpContent ;
break ;
}
break ;
}
return S ;
}