From cc6783d03572ccc2ebdf5b87dbb82e1cb3af0f11 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 27 May 2014 15:49:46 +0200 Subject: [PATCH 1/1] Using query->execute to get result into string --- src/tst.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tst.cpp b/src/tst.cpp index f35415d..893be85 100644 --- a/src/tst.cpp +++ b/src/tst.cpp @@ -37,7 +37,7 @@ example_2(Zorba* aZorba) // lQuery->setFileName("http://base/"); lQuery->setFileName("/home/adam/proj/marc2bibframe/xbin/"); - lQuery->compile(*qfile.get(), lHints); + lQuery->compile(*qfile, lHints); zorba::DynamicContext* lDynamicContext = lQuery->getDynamicContext(); @@ -57,7 +57,13 @@ example_2(Zorba* aZorba) "/home/adam/proj/yaz/test/marc7.xml"); lDynamicContext->setVariable("marcxmluri", lItem); - std::cout << lQuery << std::endl; + std::stringstream ss; + + lQuery->execute(ss); + + std::string result = ss.str(); + + std::cout << result << std::endl; return true; } -- 1.7.10.4