readium / go-toolkit

A toolkit for ebooks, audiobooks and comics written in Go
https://readium.org/web
BSD 3-Clause "New" or "Revised" License
41 stars 14 forks source link

NCX XML parsing (go automap) #30

Closed danielweck closed 7 years ago

danielweck commented 7 years ago

Should be attr:

https://github.com/readium/r2-streamer-go/blob/master/parser/epub/ncx.go

type NavPoint struct {
    PlayerOrder int        'xml:"playOrder"'
}
...
type PageList struct {
    Class      string       'xml:"class"'
    ID         string       'xml:"id"'
}
...
type PageTarget struct {
    Value     string  'xml:"value"'
    Type      string  'xml:"type"'
    PlayOrder int     'xml:"playOrder"'
}

Oh, and PageTarget is missing ID string 'xml:"id,attr"'

danielweck commented 7 years ago

NavPoint is missing ID string 'xml:"id,attr"'