Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/xml: Allow ",any" elements to be unmarshalled as raw xml #6825

Open
x6j8x opened this issue Nov 23, 2013 · 5 comments
Open

encoding/xml: Allow ",any" elements to be unmarshalled as raw xml #6825

x6j8x opened this issue Nov 23, 2013 · 5 comments
Milestone

Comments

@x6j8x
Copy link

x6j8x commented Nov 23, 2013

It would be nice if the encoding/xml package would allow to unmarshal unknown / not
explicitly mapped XML elements as raw XML.

This could be achieved by either allowing to combine the ",innerxml" and
",any" tags for struct fields or by introducing a new tag ",anyxml"
or something similar.

Example:

type MyStruct struct {
    Name string   `xml:"name"`
    Rest []string `xml:",any,innerxml"`
}
@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 1:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 2:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added repo-main.

@x6j8x
Copy link
Author

x6j8x commented Feb 13, 2014

Comment 4:

maybe use the same semantics as in https://golang.org/issue/6213
for json

@malimohub
Copy link

this would be nice for sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants