List all nodes in this XML document for diagnostic purposes Arguments: None Returns: None
| Return Type | Function name | Arguments |
|---|---|---|
| void | hzDocXml::listnodes | (void) |
Declared in file: hzDocument.h
Defined in file : hzDocXml.cpp
Function Logic:
Function body:
void hzDocXml::listnodes (void)
{
// Category: Diagnostics
//
// List all nodes in this XML document for diagnostic purposes
//
// Arguments: None
// Returns: None
hzChain Z ; // Chain to build output
hzAttrset ai ; // Attribute iterator
hzLogger* pLog ; // Logger for the thread
hzXmlNode* pNode ; // XML node
const char* anam ; // Name derived from string number
const char* aval ; // Attribute value
uint32_t nN ; // XML Document node iterator
pLog = GetThreadLogger() ;
if (!pLog)
return ;
Z.Printf("LISTING %d NODES for file %s\n", m_arrNodes.Count(), *m_Filename) ;
for (nN = 0; nN < m_arrNodes.Count() ; nN++)
{
pNode = m_arrNodes.InSitu(nN) ;
Z.Printf("Parent %u ID %u Level %d Firstchild %u sibling %u Line %d", pNode->ParentId(), pNode->Uid(), pNode->Level(), pNode->FirstChildId(), pNode->SiblingId(), pNode->Line()) ;
ai = pNode ;
if (!ai.Valid())
Z.Printf("<%s>\n", pNode->txtName()) ;
else
{
Z.Printf("<%s ", pNode->txtName()) ;
for (; ai.Valid() ; ai.Advance())
{
anam = ai.Name() ; aval = ai.Value() ;
Z.Printf(" %s='%s'", anam, aval) ;
}
Z << ">\n" ;
}
}
Z.Printf("END LIST NODES\n") ;
pLog->Log(Z) ;
}