-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
92 lines (78 loc) · 3.14 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
A C++/Objective-C++ library for reading/writing XML files.
Like boost libraries, this is just an assembly of header files,
so that users do not have to compile them in advance.
Requirements:
#Necessary
xerces-c++ library
http://xerces.apache.org/xerces-c/
or
MacOS environment
#Only for utility and sample programs
GNU readline
Install:
To install library header files to your include/ directory, do the following.
cd XMLUtilities/
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make install
This will install all header files to /usr/local/include/XMLUtilities. If you want to install to, e.g., $HOME/include, do
cmake -DCMAKE_INSTALL_PREFIX=$HOME ..
instead.
Usage:
If you installed the header files to the default header search path (e.g. /usr/local/include), the compiler will automatically find necessary header files. If non-default path is used in installation, header search path option like "-I/$(XMLUTILITIES_PATH)/include" will be necessary to compile your source files.
#C++ case
It requires Xerces-C++ library.
To utilize, add XMLUtility to include path (-I/WhereYouInstalled),
and write
#include "XMLUtilities/XMLUtilities.hpp"
or
#include "XMLUtilities/XMLUtilities.hh"
in your code.
When you build your programs, please add an include flag and linker flags like
...
CXXFLAGS += -I/$(XERCESDIR)/include -I/(XMLUTILITIES_PATH)/include
LDFLAGS += -L/$(XERCESDIR)/lib -lxerces-c
...
g++ ~~ $(CXXFLAGS) $(LDFLAGS) ~~
#Objective-C++ case
It just requires a MacOS environment (and Xcode).
To utilize in Xcode, add "/WhereYouInstalled" to "User header path" in project settings,
and write
#define XMLUTILITIES_NSXMLPARSER
#include "XMLUtilities/XMLUtilities.hpp"
or
#include "XMLUtilities/XMLUtilities.hh"
in your code.
As mentioned above, add "-I/(XMLUTILITIES_PATH)/include" flag manually
or in Xcode preferences.
Utility and sample programs:
A sample program "main_example.cpp" is in src directory.
To build this,
$ export XERCESDIR=?? # Where you installed xerces
$ g++ main_example.cpp -I/$XERCESDIR/include -L/$XERCESDIR/lib -lxerces-c -o main_example
or type 'make' as followings.
Utility programs are also in src directory.
To build and install these (including main_example.cpp),
$ export XMLUTILITIES_PATH=?? # Where you installed XMLUtilities.
$ export XERCESDIR=?? # Where you installed xerces
$ export READLINEDIR=?? # Where you installed readline
$ make
$ make install
then binaries are installed in XMLUTILITIES_PATH/bin.
<Revisions>
<Revision comitter="Soki Sakurai" date="2011/06/12">
Only ASCII is supprted.
Same tags at the same depth/rank/hierarchy are forbidden; younger one is overwritten.
</Revision>
<Revision comitter="Soki Sakurai" date="2011/06/15">
Added XMLoader.getNodes(nodename) returning std::vector, nodes in which have the name "nodename".
Support the same tags at the same depth/rank/hierarchy.
</Revision>
<Revision comitter="Soki Sakurai" date="2011/08/25">
Added Caster.hpp to get values as integer or floating.
</Revision>
<Revision comitter="Soki Sakurai" date="2012/09/19">
Added utilities (xmlushow, xmlumodify) and created 'include' and 'src' directories.
</Revision>
</Revisions>