path and mimetype are now comprehensible to handle
This commit is contained in:
parent
3737ec0549
commit
a87803ffa0
|
@ -23,7 +23,7 @@ type ZoteroItem struct {
|
||||||
XMLName xml.Name `xml:"zoteroItem"`
|
XMLName xml.Name `xml:"zoteroItem"`
|
||||||
Attachments struct {
|
Attachments struct {
|
||||||
Attachment []struct {
|
Attachment []struct {
|
||||||
Text string `xml:",chardata"`
|
Path string `xml:",chardata"`
|
||||||
MimeType string `xml:"mimeType,attr"`
|
MimeType string `xml:"mimeType,attr"`
|
||||||
} `xml:"attachment"`
|
} `xml:"attachment"`
|
||||||
} `xml:"attachments"`
|
} `xml:"attachments"`
|
||||||
|
@ -211,6 +211,9 @@ should be enough for the next successful build).`,
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, a := range zoteroItem.Attachments.Attachment {
|
||||||
|
fmt.Println(a.Path, a.MimeType)
|
||||||
|
}
|
||||||
zi, _ := xml.MarshalIndent(zoteroItem, " ", " ")
|
zi, _ := xml.MarshalIndent(zoteroItem, " ", " ")
|
||||||
_ = zi
|
_ = zi
|
||||||
// os.Stdout.Write(zi)
|
// os.Stdout.Write(zi)
|
||||||
|
|
Loading…
Reference in New Issue