如何用ofx4j解析格式错误的xml(ofx)? [英] How to parse a malformed xml (ofx) with ofx4j?

查看:180
本文介绍了如何用ofx4j解析格式错误的xml(ofx)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常绝望地尝试使用以下库: ofx4j 。但是有关解析ofx文件的文档有点精简。它说:如果你有一个文件或其他流资源,你可以使用net.sf.ofx4j.io.OFXReader的实例读取它

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 ?

它还说明如下:如果要将OFX直接解组为Java对象,请使用net.sf.ofx4j.io.AggregateUnmarshaller。

It also states the following: if you want to unmarshal the OFX directly to a Java object, use the net.sf.ofx4j.io.AggregateUnmarshaller.

很好,但这对我来说有点复杂。我错过了一些明显的东西吗?当我尝试使用unmarshaller时,它会要求我实现一个接口。

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.

有人能指点我在线资源解释我错过的位吗?或者最好的,你从之前关于ofxreader和unmarshaller的陈述中了解了什么?

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 ?

请不要打击我,我正在学习java与playframework我非常感谢能够解析那些ofx文件。

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.

提前感谢。

推荐答案

我没有看到一个简单的旧教程,但是测试目录,说明 OFXReader AggregateUnmarshaller

I don't see a plain old tutorial, but there's sample code in the test directory that illustrates OFXReader and AggregateUnmarshaller.

短语 net.sf.ofx4j.io.OFXReader 表示已知的实现类之一,例如 NanoXMLOFXReader 在这里测试 AggregateUnmarshaller 这里

API 邮件档案是资源也很好。看起来很多机构都参与其中。

The API and mail archives are good resources, too. It looks like a lot of institutions participate.

这篇关于如何用ofx4j解析格式错误的xml(ofx)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆