#include <tree.h>
Inheritance diagram for XmlTag:


Public Methods | |
| XmlTag (string a_tag) | |
| string | getString (int indent=0) const |
|
|
00171 :
00172 tag(a_tag)
00173 {
00174 }
|
|
|
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 }
|
1.2.18