Skip to content

encoding/xml: omit parent tags if value is empty #2 #7233

@kdar

Description

@kdar
What steps will reproduce the problem?
http://play.golang.org/p/m2rU4cPOBo

What is the expected output?
<OmitEmpty></OmitEmpty>

What do you see instead?
<OmitEmpty><Vars></Vars></OmitEmpty>

Please provide any additional information below.
https://golang.org/cl/6569067/

This was originally: https://golang.org/issue/4168
Ran into this issue today making a restful API service. Ended up having to make my own
custom Marshaller.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.early-in-cycleA change that should be done early in the 3 month dev cycle.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions