Skip to content

encoding/xml: Unmarshal does not properly handle NCName in XML namespaces #9775

Open
@fantasist

Description

@fantasist

Example:
type A struct {
XMLName xml.Name xml:"a:B"
}
Struct A is marshaled to "<a:B></a:B>", as expected.
However if we run
a := A{}
xml.Unmarshal([]byte("<a:B></a:B>"), &a)

It results in an error saying "unexpected error: expected element type <a:B> but have "

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