From 52ec7394f0d7cbfb3063ff91b415245936d84b13 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 29 May 2015 19:11:18 +0100 Subject: Tweak README layout. --- README | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README b/README index e9f6344..0f333ff 100644 --- a/README +++ b/README @@ -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 , throwing an exception if it does not exist */ +/* Get the contents of child node , throwing an + * exception if it does not exist + */ string s = doc.string_child ("Fred"); -/* Get the contents of child node , or 42 if it does not exist */ +/* Get the contents of child node , or 42 if it + * does not exist + */ int i = doc.optional_number_child ("Jim").get_value_or (42); -/* Get the contents of within , throwing an exception if either node - is not present. -*/ +/* Get the contents of within , + * throwing an exception if either node + * is not present. + */ double d = doc.node_child("Sheila").number_child ("Roger"); For full details, see src/cxml.h -- cgit v1.2.3