1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-07 05: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
parent f41286cac7
commit a3f4f625f7
6 changed files with 26 additions and 17 deletions

View File

@ -85,6 +85,10 @@ func (oq *Request) Marshal() (*bytes.Buffer, error) {
if oq.indent {
encoder.Indent("", " ")
}
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"}}