Am 14.02.21 um 22:12 schrieb Martin Preuss:
[...]
>> * The BankID and Bank Name were set to a string of 0s on the credit card 
>> account. I didn't try connecting with the 0s but changed both as Bob White 
>> has done.
> Maybe the OFX importer didn't catch those fields...
[...]

Okay, I've had it... ;-)

I started changing AqBanking's OFX import process.

Currently we use a very old importer which is quite hard to extend to read some 
OFX fields it currently doesn't recognize. I found that out the hard way while 
thinking about adding the bank name sent in the field 
"OFX/SIGNONMSGSRSV1/SONRS/FI/ORG" to the imported dataset.

The old importer would require me to add two new classes to read the FI and the 
ORG fields. Also it didn't handle unknown elements very well.

For OFXv2 I already started using our generic XML importer. Until now I 
couldn't use that for OFXv1 due to its use of SGML.

Libgwen's XML code can now read those files as well, so there is a way now to 
handle OFX files with AqBanking's XML importer.

This importer uses XML files which describe what data to extract from which XML 
element. We use it already to read and write SEPA and CAMT data.

Now adding a field like "bankname" is quite easy, just by adding this line to 
the description file:

----------------------------------------------------------------------------------X8
          <DbSetCharValue name="bankName" path="SIGNONMSGSRSV1/SONRS/FI/ORG" />
----------------------------------------------------------------------------------X8


You can test the new importer using the latest Gwenhywfar and AqBanking git 
version (please remember to do "make clean" before "make"):

----------------------------------------------------------------------------------X8

aqbanking-cli import -c OUTPUTFILE -f YOUR_OFX_FILE --importer="xml" 
--profile="ofx1"
----------------------------------------------------------------------------------X8


Currently the new importer reads account info, bank/credit card statements and 
balances. New data will be added as soon as I can find more OFX examples 
(thanks to all of you who already submitted OFX data which I used to get the 
importer this far!).


The current format description file can be found in the GIT repository at:

https://www.aquamaniac.de/rdm/projects/aqbanking/repository/revisions/master/show/src/libs/plugins/imexporters/xml/data

or, more specific:

https://www.aquamaniac.de/rdm/projects/aqbanking/repository/revisions/master/entry/src/libs/plugins/imexporters/xml/data/ofx1.xml


As always feedback is very welcome.


Regards
Martin

-- 
"Things are only impossible until they're not"
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to