Changes

Jump to navigation Jump to search
1,179 bytes added ,  08:09, 14 March 2020
add xpath examples
== Bank statement parser ==
Since it is cumbersome to enter all incoming and outgoing transactions by hand, it was decided that the Bank statements will be automatically parsed and entered from the exported CSV file.To generate your own files for testing purposes, you can use the demo account of the postbank; go to https://meine.postbank.de/#/login and select "Demo-Konto testen". === CSV ===
The generated statements are in CSV format, encoded in Windows-1252/Latin-1 (UTF-8 incompatible), delimited by semicolons, Contain 8 lines of headers, and multiple sections delimited by empty lines. The section we are interested in ("gebuchte Umsätze;") maps 8 columns:
# Betrag (€), format "-25,00 €", positive if incoming
# Saldo (€), format "123,45 €"
 
=== XML ===
 
It is also possible to output in an XML file, which reduces the risk of parsing errors. The XML looks very arcane, but the important attributes are easy to query (described in xpath)
 
* <code>/document/BkToCstmrAcctRpt/Rpt/Bal/Amt</code> contains the current account balance.
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry</code> exists multiple times, once for each transaction.
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry[n]/Amt</code> contains the amount of the transaction
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry[n]/BookgDt</code> and
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry[n]/ValDt</code> contains the times
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry[n]/NtryDtls/TxDtls/RmtInf/Ustrd[n]</code> contains one line of the description
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry[n]/NtryDtls/TxDtls/RltdPties/Dbtr/Nm</code> contains the name of the debitor
* <code>/document/BkToCstmrAcctRpt/Rpt/Ntry[n]/NtryDtls/TxDtls/RltdPties/Cdtr/Nm</code> contains the name of the creditor

Navigation menu