summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-15 00:30:05 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:51 -0400
commit9e55655e0c1a56d3059bd8fc485e37fc3333b3bb (patch)
tree92ff00093779b7c7fb843417c27726508fa9f557 /src/main.cc
parentb36d24481d37170195e3f92267b343b9489c6bba (diff)
downloadledger-9e55655e0c1a56d3059bd8fc485e37fc3333b3bb.tar.gz
ledger-9e55655e0c1a56d3059bd8fc485e37fc3333b3bb.tar.bz2
ledger-9e55655e0c1a56d3059bd8fc485e37fc3333b3bb.zip
Got the xpath command working again.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc
index 3db75442..7aea3c2c 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -269,10 +269,12 @@ static int read_and_report(ledger::report_t * report, int argc, char * argv[],
xpath.print(*out, xml_document);
*out << std::endl;
-#if 0
- std::auto_ptr<repitem_t> items(repitem_t::wrap(&session, report, true));
- items->select(path.get());
-#endif
+ value_t nodelist;
+ xpath.calc(nodelist, xml_document, report);
+
+ foreach (const value_t& node, nodelist.as_sequence())
+ node.as_xml_node()->print(*out);
+
return 0;
}