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: Unmarshal doesn't respect namespace uniqueness #4691

Closed
gopherbot opened this Issue Jan 23, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@gopherbot
Copy link

gopherbot commented Jan 23, 2013

by chris.jones.yar:

What steps will reproduce the problem?
http://play.golang.org/p/Wl1_bz8M9I

What is the expected output?
NsRoot{HTable: HtmlTable{Rows: []HtmlTr[HtmlTr{Td: []string{"Apples",
"Bananas"}}}}, FTable: FurnTable{Name: "African Coffee Table",
Width: 80, Length: 120}}

What do you see instead?
unmarshal failed: main.NsRoot field "HTable" with tag
"http://www.w3.org/TR/html4/ table" conflicts with field "FTable"
with tag "http://www.w3schools.com/furniture table"

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?


Which version are you using?  (run 'go version')


Please provide any additional information below.
This is the example from http://www.w3schools.com/xml/xml_namespaces.asp .
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Jan 23, 2013

Comment 1 by chris.jones.yar:

See also issue #3526.
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jan 30, 2013

Comment 2:

Test case at https://golang.org/cl/7227056. The error comes from
the analysis done on the struct. This cannot be fixed until Marshal
distinguishes the two tables correctly (or else we'll break Marshal by
fixing the type info generator).
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jan 30, 2013

Comment 3:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Mar 12, 2013

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Mar 12, 2013

Comment 5:

This issue was closed by revision 4dd3e1e.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015

@rsc rsc removed the go1.1 label Apr 14, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.