1

I went to my online bank account and did an export of my transactions into a format that's supposed to be consumed by Quickbooks. I've attached a sample response (with fake data) to this question. My questions are as follows:

  1. Is there only a maximum of 1 STMTRS node to each STMTTRNRS node?

  2. Is there only a maximum of 1 BANKACCTFROM node to each STMTRS node?

  3. Is there only a maximum of 1 BANKTRANLIST node to each STMTRS node?

  4. Is there only a maximum of 1 DTSTART node to each BANKTRANLIST node?

  5. Is there only a maximum of 1 DTEND node to each BANKTRANLIST node?

Here's the example quickbooks xml document

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:TYPE1
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
 <SIGNONMSGSRSV1>
  <SONRS>
   <STATUS>
    <CODE>0
    <SEVERITY>INFO
    <MESSAGE>OK
   </STATUS>
   <DTSERVER>20131200000000[-5]
   <LANGUAGE>ENG
   <INTU.BID>00015
  </SONRS>
 </SIGNONMSGSRSV1>
 <BANKMSGSRSV1>
  <STMTTRNRS>
   <TRNUID>C0010000000000000
   <STATUS>
    <CODE>0
    <SEVERITY>INFO
    <MESSAGE>OK
   </STATUS>
   <STMTRS>
    <CURDEF>CAD
    <BANKACCTFROM>
     <BANKID>000000000
     <ACCTID>01111111999
     <ACCTTYPE>CHECKING
    </BANKACCTFROM>
    <BANKTRANLIST>
     <DTSTART>20130917120000[-5]
     <DTEND>20131217120000[-5]
     <STMTTRN>
      <TRNTYPE>CREDIT
      <DTPOSTED>20131117100000[-5]
      <TRNAMT>800.00
      <FITID>900000100201309XXXXXXXXXXXXXX
      <NAME>Transfer
      <MEMO>WWW TRANSFER - 5693 
     </STMTTRN>
     <STMTTRN>etc...</STMTTRN>
     <STMTTRN>etc...</STMTTRN>
     <STMTTRN>etc...</STMTTRN>
     etc...

    </BANKTRNLIST>
   </STMTRS>
  </STMTTRNRS>
 </BANKMSGSRSV1>
</OFX>
John
  • 32,403
  • 80
  • 251
  • 422

1 Answers1

2

That's Open Financial Exchange (OFX). You can download the OFX DTDs and XSDs here. The version you have is SGML, not XML, and is 1.0.2 apparently. Per the OFXBANK.DTD in the OFX1.0.2.zip:

  1. There may be 0 or 1 STMTRS children to STMTTRNRS.
  2. There must be 1 BANKACCTFROM child to STMTRS.
  3. There may be 0 or more STMTTRN children to BANKTRANLIST.
  4. There must be one DTSTART child to BANKTRANLIST.
  5. There must be one DTEND child to BANKTRANLIST.

See also How to parse this OFX file?

Community
  • 1
  • 1
kjhughes
  • 106,133
  • 27
  • 181
  • 240