Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/xml: loss of xmlns= in encoding since Go 1.4 #11431
It's not obvious at first glance how, but https://golang.org/cl/2660 changed the behavior of the XML marshaler for people who were generating xmlns attributes "by hand". For example:
In Go 1.4 this program printed:
After this CL it prints:
In the absence of compelling justification for a breaking change, I think we should try to continue to support this way of setting the default xmlns.
I've seen tests break due to this change, and presumably real programs would break too, if the xmlns= were important.
What can we do to interpret these old programs correctly in the new more-namespace-aware world for Go 1.5?