summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-01-18 11:18:35 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-01-18 11:18:35 +0000
commit9bc19368f2fe81fec271c57ac1583c6a9eb1d014 (patch)
treeb6d4eb402b7970ed00d5bbf6deb733ed9b9e3d00 /src/pugixml.hpp
parent355d0f06971002efc2aca5a3bf2a8ecebef9b7d6 (diff)
Added find_child_by_attribute
git-svn-id: http://pugixml.googlecode.com/svn/trunk@107 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 2b014c9..3e6aa3d 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -1096,6 +1096,44 @@ namespace pugi
*/
template <typename Predicate> xml_node find_node(Predicate pred) const;
+ /**
+ * Find child node with the specified name that has specified attribute
+ *
+ * \param name - child node name
+ * \param attr_name - attribute name of child node
+ * \param attr_value - attribute value of child node
+ * \return first matching child node, or empty node
+ */
+ xml_node find_child_by_attribute(const char* name, const char* attr_name, const char* attr_value);
+
+ /**
+ * Find child node with the specified name that has specified attribute (use pattern matching for node name and attribute name/value)
+ *
+ * \param name - pattern for child node name
+ * \param attr_name - pattern for attribute name of child node
+ * \param attr_value - pattern for attribute value of child node
+ * \return first matching child node, or empty node
+ */
+ xml_node find_child_by_attribute_w(const char* name, const char* attr_name, const char* attr_value);
+
+ /**
+ * Find child node that has specified attribute
+ *
+ * \param attr_name - attribute name of child node
+ * \param attr_value - attribute value of child node
+ * \return first matching child node, or empty node
+ */
+ xml_node find_child_by_attribute(const char* attr_name, const char* attr_value);
+
+ /**
+ * Find child node that has specified attribute (use pattern matching for attribute name/value)
+ *
+ * \param attr_name - pattern for attribute name of child node
+ * \param attr_value - pattern for attribute value of child node
+ * \return first matching child node, or empty node
+ */
+ xml_node find_child_by_attribute_w(const char* attr_name, const char* attr_value);
+
#ifndef PUGIXML_NO_STL
/**
* Get the absolute node path from root as a text string.