From 971899fd404f4828886f07fb269a2111fe2d8b42 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 2 Apr 2015 00:15:44 +0200 Subject: Do not trim text, simply skip text fields that only consist of whitespace characters --- test/integration/TestXmlParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/TestXmlParser.cpp b/test/integration/TestXmlParser.cpp index b9eae0e..a3d4563 100644 --- a/test/integration/TestXmlParser.cpp +++ b/test/integration/TestXmlParser.cpp @@ -179,8 +179,8 @@ static void xmlCharacterDataHandler(void *ref, const XML_Char *s, int len) *(static_cast *>(XML_GetUserData(parser))); // Store a new text node in the current node - std::string text = Utils::trim(std::string(s, len)); - if (!text.empty()) { + std::string text = std::string(s, len); + if (Utils::hasNonWhitepaceChar(text)) { std::shared_ptr textNode = std::make_shared(node, "$text"); textNode->text = text; -- cgit v1.2.3