OFX File Analyzer in C #

I am looking for an OFX parser library in C #. I have an internet search, but it seems not. Does anyone know of a good C # OFX parser file. I need to process some bank statement files that are in OFX format.

Update I managed to find a C # library for parsing an OFX parser.

Here is the link ofx sharp . This codebase is apparently the best option to run my solution.

+3
source share
2 answers

Try http://www.codeproject.com/KB/aspnet/Ofx_to_DataSet.aspx . The code uses Framework 3.5 and converts ax to a dataset, this can help in what you are trying to do.

0
source

I tried using thex sharp library, but realized that it wasn’t working, this is an invalid XML file ... it seems to parse but has empty values ​​...

I made changes to OFXDocumentParser.cs, where I first corrected the file to become valid XML, and then continue with the parser. Not sure if you have the same problem?

Inside the method:

private string SGMLToXML(string file)

I added a few lines to transfer the file to a new file, and then let the SqmlReader process after the following code:

string newfile = ParseHeader(file);

newfile = SGMLToXMLFixer.Fix_SONRS(newfile);
newfile = SGMLToXMLFixer.Fix_STMTTRNRS(newfile);
newfile = SGMLToXMLFixer.Fix_CCSTMTTRNRS(newfile);


//reader.InputStream = new StringReader(ParseHeader(file));
reader.InputStream = new StringReader(newfile);

SGMLToXMLFixer - , OFXSharp. , , .

namespace OFXSharp
{
    public static class SGMLToXMLFixer
    {
        public static string Fix_SONRS(string original) 
        { .... }

        public static string Fix_STMTTRNRS(string original) 
        { .... }

        public static string Fix_CCSTMTTRNRS(string original) 
        { .... }

        private static string Fix_Transactions(string file, string transactionTag, int lastIdx, out int lastIdx_new) 
        { .... }

        private static string Fix_Transactions_Recursive(string file_modified, int lastIdx, out int lastIdx_new) 
        { .... }

    }
}
0

Source: https://habr.com/ru/post/1756891/


All Articles