Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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 ... </p> <p>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?</p> <p>Inside of the method:</p> <pre><code>private string SGMLToXML(string file) </code></pre> <p>I added a few lines first to take file to newfile and then let the SqmlReader process that after the following code:</p> <pre><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); </code></pre> <p>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.</p> <pre><code>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) { .... } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload