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
Fix various link to reference. Added partinfo element for reference
[metaproxy-moved-to-github.git]
/
src
/
xmlutil.cpp
diff --git
a/src/xmlutil.cpp
b/src/xmlutil.cpp
index
6fc8f13
..
5ea9e84
100644
(file)
--- a/
src/xmlutil.cpp
+++ b/
src/xmlutil.cpp
@@
-1,4
+1,4
@@
-/* $Id: xmlutil.cpp,v 1.11 2006-12-01 12:37:26 marc Exp $
+/* $Id: xmlutil.cpp,v 1.12 2007-01-12 10:16:21 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
@@
-17,15
+17,15
@@
static const std::string metaproxy_ns = "http://indexdata.com/metaproxy";
std::string mp_xml::get_text(const struct _xmlAttr *ptr)
{
std::string mp_xml::get_text(const struct _xmlAttr *ptr)
{
- if (ptr->children->type == XML_TEXT_NODE)
- return std::string((const char *) (ptr->children->content));
- return std::string();
+ return get_text(ptr->children);
}
std::string mp_xml::get_text(const xmlNode *ptr)
{
std::string c;
}
std::string mp_xml::get_text(const xmlNode *ptr)
{
std::string c;
- for (ptr = ptr->children; ptr; ptr = ptr->next)
+ if (ptr && ptr->type != XML_TEXT_NODE)
+ ptr = ptr->children;
+ for (; ptr; ptr = ptr->next)
if (ptr->type == XML_TEXT_NODE)
c += std::string((const char *) (ptr->content));
return c;
if (ptr->type == XML_TEXT_NODE)
c += std::string((const char *) (ptr->content));
return c;