mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-29 09:15:33 +00:00
Finsihed xml model & small bugfixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package xmlmodels
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
|
||||
xmlparsing "github.com/Theodor-Springmann-Stiftung/lenz-web/xml"
|
||||
@@ -16,6 +17,22 @@ type Meta struct {
|
||||
Recieved []Action `xml:"recieved"`
|
||||
}
|
||||
|
||||
func (m Meta) Keys() []any {
|
||||
return []any{m.Letter}
|
||||
}
|
||||
|
||||
func (m Meta) Type() string {
|
||||
return META
|
||||
}
|
||||
|
||||
func (m Meta) String() string {
|
||||
json, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
return "Cant marshal to json, Meta: " + err.Error()
|
||||
}
|
||||
return string(json)
|
||||
}
|
||||
|
||||
type Action struct {
|
||||
Dates []Date `xml:"date,attr"`
|
||||
Places []RefElement `xml:"place"`
|
||||
|
||||
Reference in New Issue
Block a user