I recently hit an issue with encoding/xml that I am trying to understand. I see this type of issue has come up on golang-nuts@ a few times, but most people hitting it seem to be using struct un/marshaling, whereas I am using the de/encoders.
My use case is I need to read in XML files and spit them back out again, changing a very small part and ignoring the rest. I have something that works on simple examples, but I am hitting problems around XML namespaces. It seems if an element has an "xmlns" attribute, it appears to be parsed correctly by xml.Decoder but is mangled by xml.Encoder on the way out.
PTAL and let me know if I am misusing encoding/xml, if this is a known issue, etc.