From 59a29e18a59715dbb6c77b58314b32186e038fba Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Mon, 3 Apr 2017 19:56:16 -0400 Subject: [PATCH] profile: Save message set name somewhere other than XMLName Of course the same information is available there, but having it brought out as its own field seems more convenient and intuitive for users. --- profile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profile.go b/profile.go index db3ea94..e133e8d 100644 --- a/profile.go +++ b/profile.go @@ -53,6 +53,7 @@ type SignonInfo struct { type MessageSet struct { XMLName xml.Name // + Name string // (copy of XMLName.Local) Ver String `xml:"MSGSETCORE>VER"` // Message set version - should always match 'n' in Url String `xml:"MSGSETCORE>URL"` // URL where messages in this set are to be set OfxSec String `xml:"MSGSETCORE>OFXSEC"` // NONE or 'TYPE 1' @@ -89,6 +90,7 @@ func (msl *MessageSetList) UnmarshalXML(d *xml.Decoder, start xml.StartElement) } else { return errors.New("Invalid MSGSETLIST formatting") } + msgset.Name = msgset.XMLName.Local // Eat ending tags for tok, err = nextNonWhitespaceToken(d)