gnucash xml 和 sqlite 文件格式

gnucash xml and sqlite file format

我正在处理一个简单的数据库。 对我来说,这是我第一次使用 gnucash,我必须使用它。 当我保存我的数据库时,我希望有一个 .xml 或 sqlite 格式的文件,但是在我的保存文件夹中单击 "Save As" 后,我只看到一个 .gnucash 格式的文件和 .log 文件,但在 xml 或 sqlite。 我必须在 Java IDE 中管理这些文件。 是否有解决此问题的方法,或者是否可以直接在 Java 中直接管理 .gnucash 文件格式?

发件人:http://wiki.gnucash.org/wiki/File

How can I edit the file?

The file itself is XML data but in compressed form (compressed by the program gzip).

This is switched on or off according to the preference setting in Edit->Preferences->General where you can set or unset the checkmark at File compression. By default it is activated.

In order to have a look at your data by a text editor, you need to open a terminal window (console window) and enter the following commands:

mv foobar foobar-copy.gz
gunzip foobar-copy.gz

where you need to replace "foobar" by your actual file name, of course. After > these two commands have been entered, you can open the resulting file "foobar-copy" > in a text editor.

When you intend to make some manual changes, as we have done, make sure to have a backup of your original file somewhere in case you get something wrong. In this case, the original file, "foobar" is intact.

Once you have edited and saved the file, you don't have to gzip it yourself; GnuCash will do this upon the next save.

简而言之,xml 文件(我推测是 sqlite 文件)是压缩文件,您需要解压缩它们才能编辑它们。或者你可以告诉 GNUCash 跳过压缩。