Maybe somebody could give some insight here... I seem to be hitting a brick wall with the encoding/XML library.
For the life of me, I can't replicate the valid XML attributes from < gpx > Basically i'm unmarshalling the XML data from a GPS file, then marshalling it back into another file. Everything is working correctly, except the attribute tags for the root XML < gpx >
I've tried various
func (c *gpx) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {}
type approaches to no avail.
Basically I just want the root tag < GPX > to have all the attributes assigned correctly. Why you can't do Attributes []xml.Attr xml:",attr"or something similar is beyond me.
Good XML header -> http://pastebin.com/XjEZuBa1
I can't link the bad XML header, since I'm a new member.. but the XML unmarshal/marshal process adds _ to the namespace which causes issues, among other things.
GO Playground link: http://play.golang.org/p/J7wy6306Cj
Any help would be greatly appreciated, Thank you.