Some platforms don't even have libxml++ version defines.
[libcxml.git] / README.md
1 libcxml
2 =======
3
4 This is a very small library which provides a slightly tidier
5 C++ API than libxml++ for parsing HTML.
6
7 For example:
8
9     cxml::Document doc("RootNodeName");
10     doc.read("foo.xml");
11
12     /* Get the contents of child node <Fred>, throwing an
13      * exception if it does not exist
14      */
15     string s = doc.string_child("Fred");
16
17     /* Get the contents of child node <Jim>, or 42 if it
18      * does not exist
19      */
20     int i = doc.optional_number_child<int>("Jim").get_value_or(42);
21
22     /* Get the contents of <Roger> within <Sheila>,
23      * throwing an exception if either node
24      * is not present.
25      */
26     double d = doc.node_child("Sheila").number_child<double>("Roger");
27
28 For full details, see src/cxml.h
29
30 Building
31 -------
32
33     ./waf configure
34     ./waf build
35     sudo ./waf install
36
37 ### Build options
38
39     --target-windows      set up to do a cross-compile to Windows
40     --enable-debug        build with debugging information and without optimisation
41     --static              build statically
42     --disable-tests       disable building of tests
43     --force-cpp11         force use of C++11
44
45 ### Dependencies
46
47 - libxml++ (and libffi)
48
49
50 ---
51 Bug reports and queries to Carl Hetherington <cth@carlh.net>