Comments (6)
Ironically, bank account downloads don't seem to have the #14 problems, go figure 🤷♂️
from ofxgo.
Yikes. I'm reviewing the OFX spec now and am more confused than when I started looking at this. In addition to the issues you noted with start elements where end elements should be:
<BANKMSGSET>
should contain<BANKMSGSETV1>
, not the other way around.- Neither
<BANKMSGSET>
nor<BANKMSGSETV1>
should contain<BANKMSGSRSV1>
(either directly or indirectly) <BANKMSGSET>
is only supposed to be contained in the<MSGSETLIST>
tag in a a Profile Response,<PROFRS>
. It is used to indicate which OFX banking features your bank's implementation provides, and has nothing to do with actually providing you with your account's statement...
This violates the spec quite creatively in more ways than I would've thought possible for only having added four tags. Out of morbid curiosity, have you been able to parse this file with any other programs or libraries?
In my opinion, this is beyond broken to the point that your bank really ought to fix it, and I don't see a great way to modify the shared internals of ofxgo to support it. That said, one thing we could do is to write a bmo_client.go which implements the Client interface. Most methods could be the standard ones, but its Request method would need to be modified to look like the current contents of clientRequest, except to call a modified copy of the ParseResponse() method containing your hack above to ignore these elements. You would then have to explicitly use this client when parsing OFX files from this bank, but it wouldn't pollute that parsing code for everyone.
What do you think?
from ofxgo.
OK, that's worse than I thought. These comments lead me to think that MSGSETs are more prominent (maybe optional for single set). If they are so obscure, then I'd say it's not worth making special concessions to output that's broken so severely.
from ofxgo.
Oops, sorry those comments were confusing. The documentation refers to each unique category of message as a "message set", so I grouped them the same way. The comments are of the elements which describe the capabilities and version of the set since they were named appropriately, but in hindsight that might not have been the best idea.
I'll leave it up to you whether we try to go for this or make a kludge that will get you back in business. I feel a little less dirty if the kludge is in its own file without affecting the main parsing code, so I'm okay with that.
from ofxgo.
It seems that the way the elements are used in the BMO output is completely wrong so I'd say it's not worth polluting the library with this nonsense. As i mentioned, fortunately I can simply filter those elements out outside of the library so there's not need to do it for my sake.
from ofxgo.
Sounds good. Let me know if you find anything else!
from ofxgo.
Related Issues (12)
- slow go-get because of aclindsa/go dep HOT 3
- "Windows" new line required for some banks HOT 12
- Marshalled requests for OFX 102 should not include element end tags HOT 7
- Unable to connect to any of my banks using this HOT 2
- Pending transactions missing from query responses HOT 4
- Is There List of Finance Institution Tested HOT 3
- Don't make people search for usage examples HOT 1
- can't parse response: OFX SECURITY header not NONE HOT 7
- Unable to `go get` this package HOT 2
- `ofx transactions-cc` panics for two credit card accounts
- XML syntax error on line 1: element <MESSAGE> closed by </STATUS> HOT 6
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 ofxgo.