diff options
Diffstat (limited to 'src/cxml.cc')
| -rw-r--r-- | src/cxml.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cxml.cc b/src/cxml.cc index 3248324..77770f9 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -74,6 +74,19 @@ cxml::Node::optional_node_child (string name) const } list<shared_ptr<cxml::Node> > +cxml::Node::node_children () const +{ + xmlpp::Node::NodeList c = _node->get_children (); + + list<shared_ptr<cxml::Node> > n; + for (xmlpp::Node::NodeList::iterator i = c.begin (); i != c.end(); ++i) { + n.push_back (shared_ptr<Node> (new Node (*i))); + } + + return n; +} + +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 |
