aboutsummaryrefslogtreecommitdiff
path: root/src/xmldocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmldocument.cpp')
-rw-r--r--src/xmldocument.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/xmldocument.cpp b/src/xmldocument.cpp
index d7867d5..95b9788 100644
--- a/src/xmldocument.cpp
+++ b/src/xmldocument.cpp
@@ -1,6 +1,6 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <stdlib.h> 2#include <stdlib.h>
3#include "xmlwriter.h" 3#include "xmldocument.h"
4 4
5XmlDocument::XmlDocument( XmlNode *pRoot ) 5XmlDocument::XmlDocument( XmlNode *pRoot )
6{ 6{
@@ -17,28 +17,23 @@ XmlDocument::~XmlDocument()
17 } 17 }
18} 18}
19 19
20void XmlDocument::addNode( const char *sName, const char *sContent, bool bClose ) 20void XmlDocument::addNode( const Bu::FString &sName )
21{ 21{
22 if( pRoot == NULL ) 22 if( pRoot == NULL )
23 { 23 {
24 // This is the first node, so ignore position and just insert it. 24 // This is the first node, so ignore position and just insert it.
25 pCurrent = pRoot = new XmlNode( sName, NULL, sContent ); 25 pCurrent = pRoot = new XmlNode( sName );
26 } 26 }
27 else 27 else
28 { 28 {
29 pCurrent = pCurrent->addChild( sName, sContent ); 29 pCurrent = pCurrent->addChild( sName );
30 }
31
32 if( bClose )
33 {
34 closeNode();
35 } 30 }
36} 31}
37 32/*
38void XmlDocument::setName( const char *sName ) 33void XmlDocument::setName( const char *sName )
39{ 34{
40 pCurrent->setName( sName ); 35 pCurrent->setName( sName );
41} 36}*/
42 37
43bool XmlDocument::isCompleted() 38bool XmlDocument::isCompleted()
44{ 39{
@@ -143,7 +138,8 @@ void XmlDocument::setContent( const char *sContent )
143{ 138{
144 if( pCurrent ) 139 if( pCurrent )
145 { 140 {
146 pCurrent->setContent( sContent ); 141 printf("XmlDocument::setContent: not yet implemented.\n");
142 //pCurrent->setContent( sContent );
147 } 143 }
148} 144}
149 145