Skip to content

xsdgen issue - xmlns in tags #12

@junghao

Description

@junghao

The tags of go struct generated by xsdgen have unnecessary xmlns. This causes unnecessary xmlns while marshalling into xml.
For example, from http://www.fdsn.org/xml/station/fdsn-station-1.0.xsd, one of the generated go struct is like this:

type BaseFilterType struct {
	ResourceId  string    `xml:"resourceId,attr"`
	Name        string    `xml:"name,attr"`
	Items       []string  `xml:",any"`
	Description string    `xml:"http://www.fdsn.org/xml/station/1 Description"`
...
}

When marshalling, the Description will be this:

<Description xmlns="http://www.fdsn.org/xml/station/1"></Description>

The xmlns in elements should be omitted. And only add xmlns in the tag with "attr" of root element.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions