diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cxml.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/cxml.cc b/src/cxml.cc index 2ca46ed..ddfa00f 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -57,17 +57,11 @@ cxml::Node::optional_node_child (string name) const list<shared_ptr<cxml::Node> > cxml::Node::node_children (string name) const { - /* XXX: using find / get_path should work here, but I can't follow - how get_path works. - */ - - xmlpp::Node::NodeList c = _node->get_children (); + xmlpp::NodeSet c = _node->find (name); list<shared_ptr<cxml::Node> > n; - 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))); - } + for (xmlpp::NodeSet::iterator i = c.begin (); i != c.end(); ++i) { + n.push_back (shared_ptr<Node> (new Node (*i))); } _taken.push_back (name); |
