diff options
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main.cc b/src/main.cc index db34f183..fbda5c3d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -268,17 +268,11 @@ static int read_and_report(ledger::report_t * report, int argc, char * argv[], xpath.print(*out, xml_document); *out << std::endl; - value_t result = xpath.calc(xml_document, report); - - if (result.is_sequence()) { - foreach (const value_t& value, result.as_sequence()) { - if (value.is_xml_node()) { - value.as_xml_node()->print(std::cout); - std::cout << std::endl; - } + foreach (const value_t& value, xpath.find_all(xml_document, report)) { + if (value.is_xml_node()) { + value.as_xml_node()->print(std::cout); + std::cout << std::endl; } - } else { - std::cout << result << std::endl; } return 0; } |