#15 SGML Parse Error on Date Format


The OFX files exported by the Standard Bank of South
Africa have a date format which causes the SGML parser
to abort. This affects the following tokens


If the file is edited to remove the slashes from these
fields, the parser accepts them and processes the file

Note: there appears to be some variability, since I
have seen the following formats for downloads over the
past month:


  • ace jones

    ace jones - 2006-08-02

    Logged In: YES

    You could point out to the bank that their files fail to
    follow the OFX spec (see sec that describes how
    datetime values are to be stored). Among your examples,
    ONLY "<DTASOF>20060102" are correct.

    That having been said, it would probably be handy to have
    libofx rip out the punctuation characters.

  • Alan Zimmerman

    Alan Zimmerman - 2006-08-02

    Logged In: YES

    I have corresponded with the bank about it, and got a polite
    response saying it would be forwarded to their technical
    department. I have since heard nothing, and the behaviour
    has not changed.

    I have been manually editing the downloaded files to remove
    the additional punctuation (but only for the tags listed,
    the other identifiers based on dates in the same format seem
    to be ok), and it then imports without a problem.

  • Nobody/Anonymous

    Gnucash is getting several several reports lately about this issue. See the collecting bug:

    The date formats reported are:

    Which are both still different from what Alan already found.

    In GnuCash, these invalid dates cause libofx to crash. I'm not sure if this is what Alan meant with "abort", so I mention this explicitly.

    I would be good if libofx at lease failed more gracefully on an invalid date format. It would even be better, if it attempted to interpret the date and if successful, simply continue, optionally issuing a warning.


Log in to post a comment.