1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 19:58:37 -04:00

Omit end tags for encoding OFX 100-series requests

Closes https://github.com/aclindsa/ofxgo/issues/18
This commit is contained in:
John Starich
2019-06-14 20:20:08 -05:00
committed by Aaron Lindsay
parent 66dd37781f
commit 212fdc731b
4 changed files with 22 additions and 16 deletions

View File

@ -90,6 +90,10 @@ func (oq *Request) Marshal() (*bytes.Buffer, error) {
if oq.carriageReturn {
encoder.CarriageReturn(true)
}
if oq.Version < OfxVersion200 {
// OFX 100 series versions should avoid element close tags for compatibility
encoder.SetDisableAutoClose(ofxLeafElements...)
}
ofxElement := xml.StartElement{Name: xml.Name{Local: "OFX"}}