From 745875139b5ee46e469927d410364bfeeedb2995 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Oct 2006 15:47:45 +0000 Subject: Despite some svn oddness, I'm now moving to a new setup for the tests, that's very much like the original one, but now using build. You will need the latest build in order to build the tests. --- src/tests/xmlrepltest/xmlrepltest.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/tests/xmlrepltest/xmlrepltest.cpp (limited to 'src/tests/xmlrepltest') diff --git a/src/tests/xmlrepltest/xmlrepltest.cpp b/src/tests/xmlrepltest/xmlrepltest.cpp new file mode 100644 index 0000000..1fe9ec2 --- /dev/null +++ b/src/tests/xmlrepltest/xmlrepltest.cpp @@ -0,0 +1,31 @@ +#include "xmlwriter.h" + +int main() +{ + printf("Testing Xml Replacement...\n"); + XmlDocument w; + + w.addNode("text"); + w.setContent("this text is before the node. "); + w.addNode("keepme", "This one we keep...", true ); + w.setContent("this text is after."); + w.addNode("deleteme", "This one we don't...", true ); + w.setContent("this is last..." ); + w.closeNode(); + + //XmlWriter::writeNode( stdout, w.getRoot(), 0, NULL ); + + printf("\n\n"); + + XmlNode *xNode = w.getRoot()->detatchNode( 1 ); + + //XmlWriter::writeNode( stdout, w.getRoot(), 0, NULL ); + + printf("\n\n"); + + //XmlWriter::writeNode( stdout, xNode, 0, NULL ); + + printf("\n\n"); + + return 0; +} -- cgit v1.2.3