XmlNode::get_children, to get a list of matching children instead of the first

This commit is contained in:
Florent Le Coz
2014-05-30 04:00:29 +02:00
parent 6bde78b574
commit d33a3b7d35
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -86,9 +86,13 @@ public:
*/
std::string get_tail() const;
/**
* Get a pointer to the first child element with that name
* Get a pointer to the first child element with that name and that xml namespace
*/
XmlNode* get_child(const std::string& name, const std::string& xmlns) const;
/**
* Get a vector of all the children that have that name and that xml namespace.
*/
std::vector<XmlNode*> get_children(const std::string& name, const std::string& xmlns) const;
/**
* Add a node child to this node. Assign this node to the child’s parent.
* Returns a pointer to the newly added child.