Finsihed xml model & small bugfixes

This commit is contained in:
Simon Martens
2025-03-05 18:56:34 +01:00
parent e19fd47c17
commit e839bbebe8
46 changed files with 8928 additions and 136 deletions

View File

@@ -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"`