From 088f3cc5d2f200c27d76c23c480153f1b93f8230 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 29 Sep 2013 09:28:23 +0100 Subject: Revert 3b6dd4db. --- src/cxml.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cxml.cc b/src/cxml.cc index ddfa00f..2ca46ed 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -57,11 +57,17 @@ cxml::Node::optional_node_child (string name) const list > cxml::Node::node_children (string name) const { - xmlpp::NodeSet c = _node->find (name); + /* XXX: using find / get_path should work here, but I can't follow + how get_path works. + */ + + xmlpp::Node::NodeList c = _node->get_children (); list > n; - for (xmlpp::NodeSet::iterator i = c.begin (); i != c.end(); ++i) { - n.push_back (shared_ptr (new Node (*i))); + for (xmlpp::Node::NodeList::iterator i = c.begin (); i != c.end(); ++i) { + if ((*i)->get_name() == name) { + n.push_back (shared_ptr (new Node (*i))); + } } _taken.push_back (name); -- cgit v1.2.3