Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

XmlTag Class Reference

#include <tree.h>

Inheritance diagram for XmlTag:

Inheritance graph
[legend]
Collaboration diagram for XmlTag:

Collaboration graph
[legend]
List of all members.

Public Methods

 XmlTag (string a_tag)
string getString (int indent=0) const

Constructor & Destructor Documentation

XmlTag::XmlTag string    a_tag
 

00171    :
00172 tag(a_tag)
00173 {
00174 }


Member Function Documentation

string XmlTag::getString int    indent = 0 const [virtual]
 

Reimplemented from XmlNode.

00177 {
00178    string output;
00179   
00180    if (indent>0) 
00181       output+='\n';
00182 
00183    for (int i=0; i<indent; ++i)
00184       output+=' ';
00185 
00186    output+=string("<")+tag;
00187 
00188    if (getFirstChild()==NULL) return output+" />";
00189    else
00190    {
00191       output+=">";
00192       for (XmlNode const *cur=getFirstChild(); cur!=NULL; cur=cur->getNext())
00193       {
00194     output+=cur->getString(indent+3);
00195       }
00196       output+=string("</")+tag+">";
00197    }
00198    
00199    return output;
00200 }


The documentation for this class was generated from the following file:
Generated on Mon Apr 7 19:44:05 2003 for DuTree by doxygen1.2.18