projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added logging support for init, search , present, scan and close
[metaproxy-moved-to-github.git]
/
src
/
xmlutil.cpp
diff --git
a/src/xmlutil.cpp
b/src/xmlutil.cpp
index
0a333ea
..
7fa3667
100644
(file)
--- a/
src/xmlutil.cpp
+++ b/
src/xmlutil.cpp
@@
-1,4
+1,4
@@
-/* $Id: xmlutil.cpp,v 1.8 2006-06-19 13:08:00 adam Exp $
+/* $Id: xmlutil.cpp,v 1.9 2006-06-21 09:16:54 adam Exp $
Copyright (c) 2005-2006, Index Data.
See the LICENSE file for details
Copyright (c) 2005-2006, Index Data.
See the LICENSE file for details
@@
-32,6
+32,15
@@
bool mp_xml::get_bool(const xmlNode *ptr, bool default_value)
return default_value;
}
return default_value;
}
+int mp_xml::get_int(const xmlNode *ptr, int default_value)
+{
+ if (ptr && ptr->type == XML_TEXT_NODE && ptr->content)
+ {
+ return atoi((const char *) ptr->content);
+ }
+ return default_value;
+}
+
bool mp_xml::is_element(const xmlNode *ptr,
const std::string &ns,
const std::string &name)
bool mp_xml::is_element(const xmlNode *ptr,
const std::string &ns,
const std::string &name)