New XML file format for QOF?
Neil Williams
linux at codehelp.co.uk
Fri Oct 29 04:48:22 EDT 2004
When I started on this Palm->Invoice saga, the use of an XML interchange file
format was discussed. After looking at the current format, I am having to
discount the hierarchy based on AccountGroup because it cannot be easily
written by non-GnuCash applications - which may not have any explicit object
hierarchy in their QOF objects.
It will mean writing a new format and handlers for backend/file but I'm up for
that.
The main difference is that I would like to use the XML for data interchange
between QOF applications and to make the format more like a simple bag than a
tree:
<?xml version="1.0"?>
<qof-bag-v1>
<qof:count-data cd:type="book">1</qof:count-data>
<qof:book version="1.0.0">
<book:id type="guid">c0dd5ca1b11338f3ceae57f6e0106d75</book:id>
<qof:count-data cd:type="qof-expenses">1</qof:count-data>
<qof:object version="1.0.0" type="qof-expenses">
<obj:desc type="qof-expenses">Pilot-link QOF expenses</obj:desc>
<obj:id type="guid">c9c3c49db198b3b87e8d513e618f9078</obj:id>
<obj:date type="expense_date">1099016941</obj:date>
<obj:int32 type="type_of_expense">7</obj:int32>
<obj:int32 type="form_of_payment">2</obj:int32>
<obj:int32 type="currency_code">1</obj:int32>
<obj:int32 type="expense_amount">32</obj:int32>
<obj:int64/>
<obj:boolean/>
<obj:string type="expense_vendor">Company Name</obj:string>
<obj:string type="expense_city">City Name</obj:string>
<obj:string type="expense_attendees">Names</obj:string>
<obj:string type="expense_note">Any string content</obj:string>
<obj:gnc_numeric>
<obj:gnc_numeric_enum/>
<obj:gnc_numeric_denom/>
</obj:gnc_numeric>
</qof:object>
</qof:book>
</qof-bag-v1>
This way, the XML can hold any compatible QOF data.
I'm still working on the map to convert one to another.
--
Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
More information about the gnucash-devel
mailing list