summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/xmlfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/xmlfile.cpp')
-rw-r--r--src/lib/util/xmlfile.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp
index 2ef0acfcf0c..ad4d4e1e8f8 100644
--- a/src/lib/util/xmlfile.cpp
+++ b/src/lib/util/xmlfile.cpp
@@ -268,11 +268,10 @@ void data_node::trim_whitespace()
number of child nodes
-------------------------------------------------*/
-int data_node::count_children() const
+std::size_t data_node::count_children() const
{
- int count = 0;
-
/* loop over children and count */
+ std::size_t count = 0;
for (data_node const *node = get_first_child(); node; node = node->get_next_sibling())
count++;
return count;
@@ -280,6 +279,17 @@ int data_node::count_children() const
/*-------------------------------------------------
+ data_node::count_children - count the
+ number of child nodes
+-------------------------------------------------*/
+
+std::size_t data_node::count_attributes() const
+{
+ return m_attributes.size();
+}
+
+
+/*-------------------------------------------------
data_node::get_child - find the first
child of the specified node with the specified
tag