From: Carl Hetherington Date: Wed, 13 Jan 2016 09:44:56 +0000 (+0000) Subject: Allow True in bool_child. X-Git-Tag: v0.15.1~2 X-Git-Url: https://main.carlh.net/gitweb/?p=libcxml.git;a=commitdiff_plain;h=dda3e2036da42a1b1e00744546f9529dce4d76fb Allow True in bool_child. --- diff --git a/src/cxml.cc b/src/cxml.cc index fb8ca2d..567dc50 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -121,7 +121,7 @@ bool cxml::Node::bool_child (string c) const { string const s = string_child (c); - return (s == "1" || s == "yes"); + return (s == "1" || s == "yes" || s == "True"); } optional @@ -132,7 +132,7 @@ cxml::Node::optional_bool_child (string c) const return optional (); } - return (s.get() == "1" || s.get() == "yes"); + return (s.get() == "1" || s.get() == "yes" || s.get() == "True"); } void