void DomTree::dumpTree() const { std::cout << "root: " << name << " encoding: " << encoding << " version: " << version << std::endl; std::cout << "---------------------------------------------------" << std::endl; for(unsigned int i = 0; i < elements.size() ; i++) { int entrylevel = 0; DomElement *ptr = elements[i]; std::cout << "element: " << ptr->getName() << " value: " << ptr->getValue() << std::endl; if ( ptr->getChildren().size() > 0 ) { for(unsigned int a = 0; a < ptr->getChildren().size() ; a++) { dumpChildren(ptr->getChildren()[a],entrylevel); } } for(unsigned int c = 0; c < ptr->getAttributes().size() ; c++ ) { DomAttribute *aptr = ptr->getAttributes()[c]; std::cout << "attribute: " << aptr->getName() << " value: " << aptr->getValue() << std::endl; } std::cout << "---------------------------------------------" << std::endl; } }