diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-14 16:03:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-14 16:03:49 +0100 |
| commit | 265dab58d0cdd70e2770b7effa754a9733261b69 (patch) | |
| tree | 4c2f1f9ff2d2a3c05b11e75ab19dfdda5fcd9a46 /README | |
| parent | 7a487a8db0db604b21f4cfa4bca4f4bdbccc4d05 (diff) | |
Update .gitignore.
Diffstat (limited to 'README')
| -rw-r--r-- | README | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +libcxml +------- + +This is a very small library which provides a slightly tidier C++ API than libxml++ +for parsing HTML. + +For example: + +cxml::Document doc ("RootNodeName"); +doc.read ("foo.xml"); + +/* Get the contents of child node <Fred>, throwing an exception if it does not exist */ +string s = doc.string_child ("Fred"); + +/* Get the contents of child node <Jim>, or 42 if it does not exist */ +int i = doc.optional_number_child<int> ("Jim").get_value_or (42); + +/* Get the contents of <Roger> within <Sheila>, throwing an exception if either node + is not present. +*/ +double d = doc.node_child("Sheila").number_child<double> ("Roger"); + +For full details, see src/cxml.h + +To build: +./waf configure +./waf build +sudo ./waf install + +Bug reports and queries to Carl Hetherington <cth@carlh.net> + + + |
