i am desperatly trying to use the following library : ofx4j. But the documentation relative to parsing an ofx file is a bit lite. It says : If you've got a file or other stream resource, you can read it using an instance of net.sf.ofx4j.io.OFXReader
Ok but how do i do ?
It also states the following: if you want to unmarshal the OFX directly to a Java object, use the net.sf.ofx4j.io.AggregateUnmarshaller.
Fine, but that's a bit complicated for me. Is there something obvious that i missed ? When i try to use the unmarshaller, it asks me to implement an interface.
Could someone point me to an online resource explaining the bits that i am missing ? Or the best, what do you understand from the previous statements relative to the ofxreader and the unmarshaller ?
Please, don't bash me, I am learning java with the playframework and i would really appreciate to be able to parse those ofx files.
thanks in advance.
I don't see a plain old tutorial, but there's sample code in the test directory that illustrates
OFXReader
andAggregateUnmarshaller
.The phrase "an instance of
net.sf.ofx4j.io.OFXReader
" means one of the known implementing classes", such asNanoXMLOFXReader
, which is tested here. A test forAggregateUnmarshaller
is here.The API and mail archives are good resources, too. It looks like a lot of institutions participate.
For those that stumble on this like I did when I couldn't get the expected results from the AggregateUnmarshaller... Here is an example.