path and mimetype are now comprehensible to handle

This commit is contained in:
Marcell Mars 2022-05-07 16:40:53 +02:00
parent 988d6aa4a7
commit 2b67719462
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,7 @@ type ZoteroItem struct {
XMLName xml.Name `xml:"zoteroItem"`
Attachments struct {
Attachment []struct {
Text string `xml:",chardata"`
Path string `xml:",chardata"`
MimeType string `xml:"mimeType,attr"`
} `xml:"attachment"`
} `xml:"attachments"`
@ -211,6 +211,9 @@ should be enough for the next successful build).`,
log.Fatalln(err)
}
for _, a := range zoteroItem.Attachments.Attachment {
fmt.Println(a.Path, a.MimeType)
}
zi, _ := xml.MarshalIndent(zoteroItem, " ", " ")
_ = zi
// os.Stdout.Write(zi)