Git Product home page Git Product logo

Comments (7)

asgrim avatar asgrim commented on August 31, 2024

Any chance you could provide the statement (it's the format that we need, not the data, so please do censor it and replace it with dummy data)? Thanks

from ofxparser.

oceanapplications avatar oceanapplications commented on August 31, 2024

Here you go,

Thanks

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

<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0<SEVERITY>INFO<MESSAGE>Login successful</STATUS><DTSERVER>20151208093522.527[-7:MST]<LANGUAGE>ENG<FI><ORG>AMEX<FID>3106</FI><ORIGIN.ID>FMPWeb<INTU.BID>3106<START.TIME>20151208093522<INTU.USERID>userid</SONRS></SIGNONMSGSRSV1><CREDITCARDMSGSRSV1><CCSTMTTRNRS><TRNUID>0<STATUS><CODE>0<SEVERITY>INFO</STATUS><CCSTMTRS><CURDEF>USD<CCACCTFROM><ACCTID>379747385927584<DOWNLOAD.FLAG>false<DOWNLOAD.TYPE>downloadDateRange<AMEX.BASICACCT>3797553433333<AMEX.ROLE>B<AMEX.UNIVID>bb8f12c49b899f471b93469a5757575</CCACCTFROM><BANKTRANLIST><DTSTART>20151201050000.000[-7:MST]<DTEND>20151204050000.000[-7:MST]<STMTTRN><TRNTYPE>DEBIT<DTPOSTED>20151201000000.000[-7:MST]<TRNAMT>-7.81<FITID>32015344444866888<REFNUM>320144450773866888<NAME>SUBWAY              FRISCO     <MEMO> FirstName LastName-33333-020777777   970-6683888</STMTTRN><STMTTRN><TRNTYPE>DEBIT<DTPOSTED>20151202000000.000[-7:MST]<TRNAMT>-7.35<FITID>32015334444446998<REFNUM>32014444796076998<NAME>SAFEWAY  STORE  0836FRISCO     <MEMO>FirstName LastName-33333-GROCERY STORE</STMTTRN><STMTTRN><TRNTYPE>DEBIT<DTPOSTED>20151203000000.000[-7:MST]<TRNAMT>-52.78<FITID>320153374444444402<REFNUM>32044440823334402<NAME>MSFT   *XBOX LIVE 00BILL.MS.NET<MEMO>FirstName LastName-33333-PS006JRNGNX 800-642-7676</STMTTRN></BANKTRANLIST><LEDGERBAL><BALAMT>-457.5<DTASOF>20151208050000.000[-7:MST]</LEDGERBAL><CYCLECUT.INDICATOR>false<PURGE.INDICATOR>false<INTL.INDICATOR>false</CCSTMTRS></CCSTMTTRNRS></CREDITCARDMSGSRSV1></OFX>

from ofxparser.

asgrim avatar asgrim commented on August 31, 2024

is the OFX completely without newlines? the procedures we use rely on newlines to discover unclosed XML tags :s not sure how to go above this, I'm afraid

from ofxparser.

oceanapplications avatar oceanapplications commented on August 31, 2024

Yeah, there's no new lines in it. Where would the right place be to add in line breaks? Might be solvable with regex.

from ofxparser.

asgrim avatar asgrim commented on August 31, 2024

That's the trouble - we don't know the right place for the line breaks. If line breaks are in, we rely on them to close unclosed SGML elements to allow XML parsing of the document (see: https://github.com/asgrim/ofxparser/blob/master/lib/OfxParser/Parser.php#L85), which means we can't reliably figure out the flow of the document. I'll leave this open of course in case anyone wants to tackle it, but people with OFX parsing insight seem pretty thin on the ground :(

from ofxparser.

oceanapplications avatar oceanapplications commented on August 31, 2024

I went through and formatted it by hand using another OFX that had line breaks as an example. The format is basically line breaks after every starting tag that doesn't have data and after every end tag. The tags that have data don't have end tags and are never nested.

I ran find replace on < and replaced it with \n< which seems to be working. After the find/replace the document processes seemingly without errors. Should be a super easy fix to implement.

from ofxparser.

asgrim avatar asgrim commented on August 31, 2024

Fixed by #14

from ofxparser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.