From a45e4307d377da9fbd17890a3701b443eef5b94e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 22 Apr 2018 21:52:32 +0100 Subject: Make Node::content ignore comments and CDATA. --- src/cxml.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cxml.cc') diff --git a/src/cxml.cc b/src/cxml.cc index 77770f9..3c2eda2 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -220,7 +220,7 @@ cxml::Node::content () const xmlpp::Node::NodeList c = _node->get_children (); for (xmlpp::Node::NodeList::const_iterator i = c.begin(); i != c.end(); ++i) { xmlpp::ContentNode const * v = dynamic_cast (*i); - if (v) { + if (v && dynamic_cast(v)) { content += v->get_content (); } } -- cgit v1.2.3