diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-06 18:51:29 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-06 18:51:29 +0000 |
commit | 8e0c64401f1b6f7b8a1ad5cc68227fc344f149dc (patch) | |
tree | 88f073e87a6d0408614e604102eb383ba71b7f29 /src | |
parent | 382a33ce4b19ccc9b6f89268a0de17eeac63f559 (diff) |
xml_node::all_elements_by_name is now deprecated
git-svn-id: http://pugixml.googlecode.com/svn/trunk@563 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src')
-rw-r--r-- | src/pugixml.hpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 376d4e4..a1254b6 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -791,6 +791,25 @@ namespace pugi explicit xml_node(xml_node_struct* p);
private:
+ template <typename OutputIterator> void all_elements_by_name_helper(const char_t* name, OutputIterator it) const
+ {
+ if (!_root) return;
+
+ for (xml_node node = first_child(); node; node = node.next_sibling())
+ {
+ if (node.type() == node_element)
+ {
+ if (impl::strequal(name, node.name()))
+ {
+ *it = node;
+ ++it;
+ }
+
+ if (node.first_child()) node.all_elements_by_name_helper(name, it);
+ }
+ }
+ }
+
template <typename OutputIterator> void all_elements_by_name_w_helper(const char_t* name, OutputIterator it) const
{
if (!_root) return;
@@ -1241,24 +1260,12 @@ namespace pugi *
* \param name - node name
* \param it - output iterator (for example, std::back_insert_iterator (result of std::back_inserter))
+ *
+ * \deprecated This function is deprecated
*/
- template <typename OutputIterator> void all_elements_by_name(const char_t* name, OutputIterator it) const
+ template <typename OutputIterator> PUGIXML_DEPRECATED void all_elements_by_name(const char_t* name, OutputIterator it) const
{
- if (!_root) return;
-
- for (xml_node node = first_child(); node; node = node.next_sibling())
- {
- if (node.type() == node_element)
- {
- if (impl::strequal(name, node.name()))
- {
- *it = node;
- ++it;
- }
-
- if (node.first_child()) node.all_elements_by_name(name, it);
- }
- }
+ all_elements_by_name_helper(name, it);
}
/**
|