We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type="xsd:date" maxOccurs="unbounded"
Hi! Thanks for the excellent tool.
I was using xsdgen on this schema: https://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd
xsdgen
This mostly worked, except for one field:
<xsd:element name="ScheduledOn" type="xsd:date" minOccurs="0" maxOccurs="unbounded"/>
The resulting struct has the correct type:
ScheduledOn []time.Time `xml:"http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2 ScheduledOn,omitempty"`
but in the marshall/unmarshall functions, there's a type mismatch (cannot convert &layout.T.ScheduledOn (value of type *[]time.Time) to *xsdDate)
cannot convert &layout.T.ScheduledOn (value of type *[]time.Time) to *xsdDate
func (t *Workoutt) MarshalXML(e *xml.Encoder, start xml.StartElement) error { type T Workoutt var layout struct { *T ScheduledOn *xsdDate `xml:"http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2 ScheduledOn,omitempty"` } layout.T = (*T)(t) layout.ScheduledOn = (*xsdDate)(&layout.T.ScheduledOn) return e.EncodeElement(layout, start) } func (t *Workoutt) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { type T Workoutt var overlay struct { *T ScheduledOn *xsdDate `xml:"http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2 ScheduledOn,omitempty"` } overlay.T = (*T)(t) overlay.ScheduledOn = (*xsdDate)(&overlay.T.ScheduledOn) return d.DecodeElement(&overlay, &start) }
The text was updated successfully, but these errors were encountered:
Same with
<xs:complexType name="ArrayOfAppManifestsType"> <xs:sequence> <xs:element name="Manifest" type="xs:base64Binary" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType>
Sorry, something went wrong.
No branches or pull requests
Hi! Thanks for the excellent tool.
I was using
xsdgen
on this schema: https://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsdThis mostly worked, except for one field:
The resulting struct has the correct type:
but in the marshall/unmarshall functions, there's a type mismatch (
cannot convert &layout.T.ScheduledOn (value of type *[]time.Time) to *xsdDate
)The text was updated successfully, but these errors were encountered: