diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-09-29 09:28:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-09-29 09:28:23 +0100 |
| commit | 088f3cc5d2f200c27d76c23c480153f1b93f8230 (patch) | |
| tree | 3e43a4174c5e0a9458a753d1e3db8bb5ddb43fba /src | |
| parent | c534aeb70d3770b5a081796b7aae1cfef1411cad (diff) | |
Revert 3b6dd4db.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cxml.cc | 12 |
1 files changed, 9 insertions, 3 deletions
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<shared_ptr<cxml::Node> > 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<shared_ptr<cxml::Node> > n; - for (xmlpp::NodeSet::iterator i = c.begin (); i != c.end(); ++i) { - n.push_back (shared_ptr<Node> (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<Node> (new Node (*i))); + } } _taken.push_back (name); |
