Is there a downside in using `xml.Encode` instead of `xml.EncodeElement` 
when implementing the `xml.Marshaler` interface?

I see in the documentation:

    Using start as the element tag is not required, but doing so will 
enable Unmarshal to match the XML elements to the correct struct field.

But am not sure if not leveraging "will enable..." does have a concrete 

I marshal a type `Amount` to `<amount currency="USD">42</amount>` via 
`xml.Encoder.Encode`: . 

If I however use `xml.Encoder.EncodeElement` I get: `<Amount 
currency="USD">42</Amount>` (uppercased).

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to