C# 中的 OFX 文件解析器
我正在寻找 C# 中的 OFX 文件解析器库。我在网上搜索过,但似乎没有。有谁知道任何优质的 C# OFX 文件解析器。我需要处理一些 OFX 格式的银行对账单文件。
更新 我设法找到了一个用于解析 OFX 解析器的 C# 库。
这是ofx Sharp 的链接。该代码库似乎是启动我的解决方案的最佳案例。
I am looking for an OFX file parser library in C#. I have search the web but there seems to be none. Does anyone know of any good quality C# OFX file parser. I need to process some bank statements files which are in OFX format.
Update
I have managed to find a C# library for parsing OFX parser.
Here is the link ofx sharp. This codebase seems to be the best case to startup my solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我尝试使用 ofx Sharp 库,但意识到它不起作用,因为该文件不是有效的 XML ...它似乎可以解析,但具有空值...
我在 OFXDocumentParser.cs 中进行了更改,我首先修复文件变成有效的 XML,然后让解析器继续。不确定您是否遇到过同样的问题?
在方法内部:
我首先添加了几行,将文件保存到新文件中,然后让 SqmlReader 在以下代码之后处理:
SGMLToXMLFixer 是我添加到 OFXSharp 库中的新类。它基本上扫描所有打开的标签并验证它是否也有结束标签。
I tried to use the ofx sharp library, but realised it doesn't work is the file is not valid XML ... it seems to parse but has empty values ...
I made a change in the OFXDocumentParser.cs where I first fix the file to become valid XML and then let the parser continue. Not sure if you experienced the same issue?
Inside of the method:
I added a few lines first to take file to newfile and then let the SqmlReader process that after the following code:
SGMLToXMLFixer is new class I added into the OFXSharp library. It basically scans all the tags that open and verifies it has a closing tag too.
尝试 http://www.codeproject.com/KB/aspnet/Ofx_to_DataSet.aspx。该代码使用 Framework 3.5 并将 ofx 转换为数据集,这可能有助于您尝试执行的操作。
Try http://www.codeproject.com/KB/aspnet/Ofx_to_DataSet.aspx. The code uses Framework 3.5 and transforms an ofx into a dataset, this may help with what you're trying to do.