diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-07-19 16:00:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-07-19 16:00:53 +0100 |
| commit | 00a593c9362aabd5df4f4c9d37d00ef1caba139f (patch) | |
| tree | c379f7056d80345e8c1ae3ba2564e2f7a6e2d54b | |
| parent | 3670bb492bdc97eec856ed0614042f1831f37a6b (diff) | |
Tweak README formatting.
| -rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -6,24 +6,24 @@ C++ API than libxml++ for parsing HTML. For example: - cxml::Document doc ("RootNodeName"); - doc.read ("foo.xml"); + 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"); + 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); + 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"); + double d = doc.node_child("Sheila").number_child<double>("Roger"); For full details, see src/cxml.h |
