XML::QOFQSF - Parse QSF XML files created by the QOF XML backend
Support for the QOF SQLite backend will be added in due course.
Version 0.02
Provides a single home for all QOF objects expressed as QSF XML. A similar module for the SQLite backend is also planned. To have your QOF object included, simply send me a sample QSF XML file. A script to create the content is also planned.
A little code snippet.
use XML::QOFQSF qw(QSFParse); use Date::Parse; use Date::Format; my $file = "qsf-mileage.xml"; my %obj = QSFParse("$file"); my $expenses = $obj{'pilot_expenses'}; my $exp_count = @$expenses; print "Status: $exp_count expenses\n"; my $template = "%A, %o %B %Y"; my $total_miles = 0; foreach my $a (@$expenses) { if ($a->type_of_expense eq "Mileage") { $total_miles += $a->expense_amount; print $a->expense_amount . " " . $a->distance_unit . " : "; print $a->expense_vendor . " " . $a->expense_city; print " on " . time2str($template, $a->expense_date) . "\n"; } } print "Total: $total_miles\n";
XML::QOFQSF exports a single function, to parse a QSF XML file. Data from the file is read into an array of objects of each supported type and references to each array are added to the object_list hash using the object name as the key.
pilot-qof objects (pilot_address, pilot_expenses, pilot_datebook and pilot_todo) are supported. gpe-expenses is also supported. Outline support is included for cashutil objects but as cashutil is currently unreleased, full support is pending.
http://qof.sourceforge.net/
http://pilot-qof.sourceforge.net/
http://gpe-expenses.sourceforge.net/
http://cashutil.sourceforge.net/
Passed a QSF XML filename, returns a hash of array references, indexed by the name of the objects found in the QSF XML file.
Neil Williams, <codehelp at debian.org>
<codehelp at debian.org>
Please report any bugs or feature requests to bug-xml-qofqsf at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-QOFQSF. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-xml-qofqsf at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc XML::QOFQSF
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/XML-QOFQSF
CPAN Ratings
http://cpanratings.perl.org/d/XML-QOFQSF
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-QOFQSF
Search CPAN
http://search.cpan.org/dist/XML-QOFQSF
Copyright 2007 Neil Williams. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
To install XML::QOFQSF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::QOFQSF
CPAN shell
perl -MCPAN -e shell install XML::QOFQSF
For more information on module installation, please visit the detailed CPAN module installation guide.