The JSON parsing is not working with OXF files that use end-tags in the OFX elements
the-darc opened this issue · comments
I have some OFX files that contain end-tags in your elements. Example:
(... HEADER ...)
<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0</CODE>
<SEVERITY>INFO</SEVERITY>
</STATUS>
(... MORE CONTENT ...)
And for those files the result of Banking.parseFile()
is an object with undefined
in the body
property:
{
xml: '<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0</CODE></CODE><SEVERITY>INFO</SEVERITY></SEVERITY></STATUS>...',
body: undefined,
header: { OFXHEADER: '100', ...}
}
As mentioned above, is expected that the OFX parser accepts OFX files with and without end tags:
2.8 Backward Compatibility with Pre-OFX 2.2 Systems
Post-OFX 2.0 differs from pre-OFX 2.0 mainly through the required use of end tags on all elements and through the use of an XML compliant header. OFX 1.0.2 required any parser to accept end tags but did not require clients or servers to send elements with end tags.
From: Specification 2.2 Public DRAFT