aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-11-12 21:08:43 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-11-12 21:08:43 +0000
commit8ae61a8b1335efdaef0208a138b178ba221b4b18 (patch)
treefc90ddf699f52416a1300ec5f2a729c88da8b14b
parent891f8b9a36d30450d1cf61e4a464f693be76d0e1 (diff)
downloadpaludis-8ae61a8b1335efdaef0208a138b178ba221b4b18.tar.gz
paludis-8ae61a8b1335efdaef0208a138b178ba221b4b18.tar.xz
Don't add extra whitespace.
-rw-r--r--paludis/repositories/e/xml_things.cc18
1 files changed, 3 insertions, 15 deletions
diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc
index e08d43a..4e2ee3e 100644
--- a/paludis/repositories/e/xml_things.cc
+++ b/paludis/repositories/e/xml_things.cc
@@ -96,7 +96,7 @@ namespace
{
case XML_TEXT_NODE:
case XML_CDATA_SECTION_NODE:
- return fix_whitespace(unstupid_libxml_string(node->content));
+ return unstupid_libxml_string(node->content);
default:
throw XMLError("Node not an XML_TEXT_NODE or XML_CDATA_SECTION_NODE");
@@ -106,21 +106,9 @@ namespace
std::string extract_children_text(const std::tr1::shared_ptr<const xmlXPathObject> & object)
{
std::string result;
- bool need_space(false);
-
for (int j = 0 ; j != object->nodesetval->nodeNr ; ++j)
- {
- std::string item(extract_child_text(object->nodesetval->nodeTab[j]));
- if (! item.empty())
- {
- if (need_space)
- result.append(" ");
- result.append(item);
- need_space = true;
- }
- }
-
- return result;
+ result.append(extract_child_text(object->nodesetval->nodeTab[j]));
+ return fix_whitespace(result);
}
template <typename T_>