aboutsummaryrefslogtreecommitdiff
path: root/src/test/xmlreadtest.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-06-06 07:52:12 +0000
committerMike Buland <eichlan@xagasoft.com>2006-06-06 07:52:12 +0000
commit5c3263289b3e10c49badd416e12075af0f2f294e (patch)
tree9d0b1f3bb167f794ec18466f94f7e8ce6b1d02fa /src/test/xmlreadtest.cpp
parent579a58106e541ef4a005eceaf4577048c69fa539 (diff)
downloadlibbu++-5c3263289b3e10c49badd416e12075af0f2f294e.tar.gz
libbu++-5c3263289b3e10c49badd416e12075af0f2f294e.tar.bz2
libbu++-5c3263289b3e10c49badd416e12075af0f2f294e.tar.xz
libbu++-5c3263289b3e10c49badd416e12075af0f2f294e.zip
Added comment handling to the XML system. It just discards them completely, but
later it will retain them so that even after modifying the nodes the comments could be kept in place so they aren't destroyed if something changes. Also added necesarry functions to the XmlDocument that lets the tests run again and fixes some issues with multiple ownernership when transfering the contents to a new document.
Diffstat (limited to 'src/test/xmlreadtest.cpp')
-rw-r--r--src/test/xmlreadtest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/xmlreadtest.cpp b/src/test/xmlreadtest.cpp
index 5fbd021..f6d8d8b 100644
--- a/src/test/xmlreadtest.cpp
+++ b/src/test/xmlreadtest.cpp
@@ -14,14 +14,14 @@ int main( int argc, char *argv[] )
14 if( argv[1][0] == 'f' ) 14 if( argv[1][0] == 'f' )
15 { 15 {
16 XmlFileReader r( argv[2], true ); 16 XmlFileReader r( argv[2], true );
17 XmlFileWriter w( argv[3], "\t", r.getRoot() ); 17 XmlFileWriter w( argv[3], "\t", r.detatchRoot() );
18 w.write(); 18 w.write();
19 //XmlWriter::write( argv[3], r.getRoot(), "\t" );
20 } 19 }
21 else if( argv[1][0] == 's' ) 20 else if( argv[1][0] == 's' )
22 { 21 {
23 XmlStringReader r( argv[2], true ); 22 XmlStringReader r( argv[2], true );
24 //XmlWriter::write( argv[3], r.getRoot(), "\t" ); 23 XmlWriter w( argv[3], "\t", r.detatchRoot() );
24 w.write();
25 } 25 }
26 26
27 return 0; 27 return 0;