summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main.cc b/src/main.cc
index 2b9b71f0..a0bf035b 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -286,12 +286,27 @@ static int read_and_report(ledger::report_t& report, int argc, char * argv[],
xpath.print(*out, doc_scope);
*out << std::endl;
+ IF_INFO() {
+ *out << "Raw results:" << std::endl;
+
+ foreach (const value_t& value, xpath.find_all(doc_scope)) {
+ if (value.is_xml_node())
+ value.as_xml_node()->print(std::cout);
+ else
+ std::cout << value;
+ std::cout << std::endl;
+ }
+
+ *out << "Compiled results:" << std::endl;
+ }
+
+ xml_document.compile();
+
foreach (const value_t& value, xpath.find_all(doc_scope)) {
- if (value.is_xml_node()) {
+ if (value.is_xml_node())
value.as_xml_node()->print(std::cout);
- } else {
+ else
std::cout << value;
- }
std::cout << std::endl;
}
return 0;