Comments (7)
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.
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.
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.
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.
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.
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.
Fixed by #14
from ofxparser.
Related Issues (20)
- Parser Fails with Credit Card Transactions HOT 4
- Using namespaces HOT 1
- Unable to parse Google Finance ("Investment" type) OFX HOT 7
- Looking in wrong tag for credit card account info? HOT 2
- XML Tags uncloseds HOT 2
- Regex amount parsing wrong HOT 8
- Support multi-line and one-line OFX HOT 10
- I can't parse the file given in tests : ofxdata.ofx HOT 3
- Require PHP 7.1+ from release 2.0.0 HOT 1
- Transaction : DTUSER HOT 2
- Needs to be able to handle multiple items on one line in the xml HOT 9
- Need to be able to parse version 2.0.0 of OFX files HOT 1
- Investment Accounts OFX not parsing HOT 1
- Cast entities values assignments
- Additional metadata on transactions HOT 8
- Open <MEMO> with symbol " closeUnclosedXmlTags don't add </MEMO> HOT 1
- xmlParseEntityRef: no name HOT 3
- account balance format
- Maintainer wanted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ofxparser.