understanding gnucash xml files

John Ralls jralls at ceridwen.us
Mon May 20 11:32:10 EDT 2013


On May 20, 2013, at 7:27 AM, Peter von Kaehne <refdoc at gmx.net> wrote:

> In reference to my other thread, this is just a short question to
> confirm:
> 
> Is each gnc:transaction item atomic and entirely self-reliant? 
> 
> My impression is that it is. It seems that each transaction has a id
> which is (random(?)) lengthy number, it references the two accounts it
> refers to by their id but otherwise it has no connection to other
> gnc:transaction items or indeed any other items. Balances are created on
> the fly by Gnucash and are not anywhere stored.
> 
> Is this correct? 
> 

Every object is identified by a guid [1]. Object includes transaction, account, split, commodity, and many others.

Transactions contain 2 *or more* splits. In the XML backend the splits are subelements, but in the SQL backend
the splits are back-referenced by having the transaction's guid in a field in the split table.  In memory, Transaction
maintains a list of Split*. Splits reference accounts, transactions don't. More detail may be found in the respective
wiki pages [2][3].

Regards,
John Ralls

[1] http://en.wikipedia.org/wiki/Globally_unique_identifier
[2] http://wiki.gnucash.org/wiki/GnuCash_XML_format
[3] http://wiki.gnucash.org/wiki/SQL




More information about the gnucash-user mailing list