go-xmlstruct icon indicating copy to clipboard operation
go-xmlstruct copied to clipboard

Generate Go structs from multiple XML documents.

Results 7 go-xmlstruct issues
Sort by recently updated
recently updated
newest added

Because encode/xml discards anything that isn't handled explicitly, unexpected changes would result in lost data. Golang provides the `,any` and `,any,attr` tags to handle elements that aren't explicitly mapped. Adding...

enhancement

Suggested by @yene. [Jackson](https://github.com/FasterXML/jackson) is an XML parser for Java (it also supports other formats). Since go-xmlstruct has separate statistic-gathering and code-generation phases, it could also generate Jackson code.

enhancement

Suggested by @yene, related to #4. It should be possible to detect enum values, e.g. when there are a lot of observations for a value but relatively few observed values.

enhancement

Suggested by @yene. If an XSD exists for the schema exists, we can mine it for type information, for example enums (#5). It would be great if go-xmlstruct could take...

enhancement

Suggested by @mgeisler: It should be possible to override go-xmlstruct's automatic type detection for specific fields.

enhancement

Running `xmlstruct.WithCompactTypes(true)` on `` generates ```go type A struct { C struct{} `xml:"b>c"` } ``` instead of ```go type A struct { C []struct{} `xml:"b>c"` } ``` This was missed...

bug

Initially suggested by @alaa2amz in [#24](https://github.com/twpayne/go-xmlstruct/issues/24#issue-2472075137). [DTD](https://en.wikipedia.org/wiki/Document_type_definition)s can be embedded in XML documents. If they are, then go-xmlstruct should use them as part of the type definition. One way to...

enhancement