I'm trying to marshal an XML element with arbitrary attributes. I want to decide when to omit certain attributes at runtime. To do this I'm assuming that some kind of map or slice of attributes is required but neither []xml.Attr nor any other intuitive types are handled for this purpose. Can anyone explain how to marshal optional attributes to an element at runtime?I have a standing SO question for this too: http://stackoverflow.com/q/10828187/149482
Cheers