aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-10-11 15:24:42 +0000
committerMike Buland <eichlan@xagasoft.com>2006-10-11 15:24:42 +0000
commitdf6f199b4e158d1d6cfb99d45258efa22afee715 (patch)
tree05b623c1711826d94ff0c8633ca789b1bae4146d
parent67c0930cbe7d0646cf4e4dee157ea553ee8a045a (diff)
downloadlibbu++-df6f199b4e158d1d6cfb99d45258efa22afee715.tar.gz
libbu++-df6f199b4e158d1d6cfb99d45258efa22afee715.tar.bz2
libbu++-df6f199b4e158d1d6cfb99d45258efa22afee715.tar.xz
libbu++-df6f199b4e158d1d6cfb99d45258efa22afee715.zip
Fixed a wierd bug that caused each element of any part of a copied node tree to
be partially cross-linked to the node that was the root of the copy. Also fixed a bug in the xmlfilewriter that should make it both faster, and not mess up % style replacements.
Diffstat (limited to '')
-rw-r--r--src/test/xmlwritetest/xmlwritetest.cpp16
-rw-r--r--src/xmlfilewriter.cpp2
-rw-r--r--src/xmlnode.cpp4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/test/xmlwritetest/xmlwritetest.cpp b/src/test/xmlwritetest/xmlwritetest.cpp
index fc93510..54c7a80 100644
--- a/src/test/xmlwritetest/xmlwritetest.cpp
+++ b/src/test/xmlwritetest/xmlwritetest.cpp
@@ -30,19 +30,19 @@ int main()
30{ 30{
31 printf("Testing XmlWriter...\n"); 31 printf("Testing XmlWriter...\n");
32 32
33 XmlStringReader *xsr = new XmlStringReader("<stuff/>"); 33 //XmlStringReader *xsr = new XmlStringReader("<stuff/>");
34 34
35 printf("%08X\n%08X\n%08X\n", xsr, (XmlReader *)xsr, (XmlDocument *)xsr ); 35 //printf("%08X\n%08X\n%08X\n", xsr, (XmlReader *)xsr, (XmlDocument *)xsr );
36 36
37 delete (XmlDocument *)xsr; 37 //delete (XmlDocument *)xsr;
38 //XmlFileWriter wf("test.xml", "\t"); 38 XmlFileWriter wf("test.xml", "\t");
39 39
40 //fillItIn( wf ); 40 fillItIn( wf );
41 41
42 //XmlStringWriter ws("\t"); 42 XmlStringWriter ws("\t");
43 //fillItIn( ws ); 43 fillItIn( ws );
44 44
45 //printf("Now the string version:\n\n%s\n", ws.getString().c_str() ); 45 printf("Now the string version:\n\n%s\n", ws.getString().c_str() );
46 46
47 return 0; 47 return 0;
48} 48}
diff --git a/src/xmlfilewriter.cpp b/src/xmlfilewriter.cpp
index 19120a0..3c6fb41 100644
--- a/src/xmlfilewriter.cpp
+++ b/src/xmlfilewriter.cpp
@@ -23,6 +23,6 @@ XmlFileWriter::~XmlFileWriter()
23 23
24void XmlFileWriter::writeString( const char *sString ) 24void XmlFileWriter::writeString( const char *sString )
25{ 25{
26 fprintf( fh, sString ); 26 fputs( sString, fh );
27} 27}
28 28
diff --git a/src/xmlnode.cpp b/src/xmlnode.cpp
index e5c77e2..8468047 100644
--- a/src/xmlnode.cpp
+++ b/src/xmlnode.cpp
@@ -368,8 +368,8 @@ XmlNode *XmlNode::getCopy()
368 { 368 {
369 XmlNode *pChild = ((XmlNode *)lChildren[j])->getCopy(); 369 XmlNode *pChild = ((XmlNode *)lChildren[j])->getCopy();
370 pNew->lChildren.setAt( j, pChild ); 370 pNew->lChildren.setAt( j, pChild );
371 pChild->pParent = this; 371 pChild->pParent = pNew;
372 hChildren.insert( pChild->getName(), pChild ); 372 pNew->hChildren.insert( pChild->getName(), pChild );
373 } 373 }
374 374
375 nSize = lPropNames.getSize(); 375 nSize = lPropNames.getSize();