aboutsummaryrefslogtreecommitdiff
path: root/src/test/xmlwritetest/xmlwritetest.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-06-29 05:50:44 +0000
committerMike Buland <eichlan@xagasoft.com>2006-06-29 05:50:44 +0000
commit937d960d2677c87ac6d68dc5445be115ac001d3e (patch)
tree35b33aebb0cab5073fc0778f13f2425d3e18278f /src/test/xmlwritetest/xmlwritetest.cpp
parentdcd914665f6e8ea6ea4e648f7357f1c842273d87 (diff)
downloadlibbu++-937d960d2677c87ac6d68dc5445be115ac001d3e.tar.gz
libbu++-937d960d2677c87ac6d68dc5445be115ac001d3e.tar.bz2
libbu++-937d960d2677c87ac6d68dc5445be115ac001d3e.tar.xz
libbu++-937d960d2677c87ac6d68dc5445be115ac001d3e.zip
Completely switched over to the much simpler, nicer pymake. Things look great,
and the old Makefile may soon fall into disrepair. To use the old one, which should almost always be able to build at least thi library, call: make -f Makefile.legacy The new Makefile just calls pymake
Diffstat (limited to 'src/test/xmlwritetest/xmlwritetest.cpp')
-rw-r--r--src/test/xmlwritetest/xmlwritetest.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/test/xmlwritetest/xmlwritetest.cpp b/src/test/xmlwritetest/xmlwritetest.cpp
new file mode 100644
index 0000000..2986c35
--- /dev/null
+++ b/src/test/xmlwritetest/xmlwritetest.cpp
@@ -0,0 +1,41 @@
1#include "xmlfilewriter.h"
2#include "xmlstringwriter.h"
3
4void fillItIn( XmlWriter &w )
5{
6 w.addNode("thinglist");
7
8 w.addNode("thing");
9 w.addProperty("type", "Weapon");
10
11 w.addNode("id", "Klophin Staff", true );
12 w.addNode("name", "Klophin Staff", true );
13 w.addNode("durability", "0.01", true );
14 w.addNode("size", "0.1", true );
15
16 w.addNode("config");
17 w.addNode("damage", "3d6+4", true );
18 w.addNode("class", "melee", true );
19 w.addNode("type", "bludgeon", true );
20 w.addNode("damagedesc", "club/clubs", true );
21 w.closeNode();
22
23 w.closeNode();
24
25 w.closeNode();
26}
27
28int main()
29{
30 printf("Testing XmlWriter...\n");
31 //XmlFileWriter wf("test.xml", "\t");
32
33 //fillItIn( wf );
34
35 //XmlStringWriter ws("\t");
36 //fillItIn( ws );
37
38 //printf("Now the string version:\n\n%s\n", ws.getString().c_str() );
39
40 return 0;
41}