diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-05-29 19:11:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-05-29 19:11:18 +0100 |
| commit | 52ec7394f0d7cbfb3063ff91b415245936d84b13 (patch) | |
| tree | 817b6386938cafd3baed7803acfaf39f9c22b641 | |
| parent | d5482fd6f9929d7b7ee7faf4c01ed3c57af7486e (diff) | |
Tweak README layout.
| -rw-r--r-- | README | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -1,23 +1,28 @@ libcxml ------- -This is a very small library which provides a slightly tidier C++ API than libxml++ -for parsing HTML. +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 */ +/* 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 */ +/* 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. -*/ +/* 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 |
