// Iterate emits Converter elements via XML decoding. func (s Genios) Iterate(r io.Reader) (<-chan []span.Importer, error) { return span.FromXML(r, "Document", func(d *xml.Decoder, se xml.StartElement) (span.Importer, error) { doc := new(Document) err := d.DecodeElement(&doc, &se) return doc, err }) }
// Iterate. Most data is in a single XML file. func (s IEEE) Iterate(r io.Reader) (<-chan []span.Importer, error) { return span.FromXML(r, "publication", func(d *xml.Decoder, se xml.StartElement) (span.Importer, error) { p := new(Publication) err := d.DecodeElement(&p, &se) return p, err }) }
// Iterate emits Converter elements via XML decoding. func (s DeGruyter) Iterate(r io.Reader) (<-chan []span.Importer, error) { return span.FromXML(r, "article", func(d *xml.Decoder, se xml.StartElement) (span.Importer, error) { article := new(Article) err := d.DecodeElement(&article, &se) return article, err }) }
// Iterate emits Converter elements via XML decoding. func (s DublinCore) Iterate(r io.Reader) (<-chan []span.Importer, error) { return span.FromXML(r, "Record", func(d *xml.Decoder, se xml.StartElement) (span.Importer, error) { doc := new(Record) err := d.DecodeElement(&doc, &se) return doc, err }) }
// Iterate emits Converter elements via XML decoding. func (s Thieme) Iterate(r io.Reader) (<-chan []span.Importer, error) { switch s.Format { default: return span.FromXML(r, "Article", func(d *xml.Decoder, se xml.StartElement) (span.Importer, error) { doc := new(Document) err := d.DecodeElement(&doc, &se) return doc, err }) case "nlm": return span.FromXML(r, "article", func(d *xml.Decoder, se xml.StartElement) (span.Importer, error) { doc := new(Article) err := d.DecodeElement(&doc, &se) return doc, err }) } }