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)
{ .... }
}
}