Something went wrong. Try again.
Translate EPUB files into web content
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132// Structs for marshaling HTML files
package main
import ( "encoding/xml")
// Unlike the nested X(HT)ML division, this division is raw XHTML.type HtmlDivision struct { Content []byte `xml:",innerxml"`}
// The HTML structure should be a pair of one head and one body.// An HTML head will mirror an XML head.// An HTML body will be much simpler than an XML body.type HtmlBody struct { Title string `xml:"h3"` Division HtmlDivision `xml:"div"`}
type HtmlHead struct { Title string `xml:"title"`}
type Html struct { XMLName xml.Name `xml:"html"` Head HtmlHead `xml:"head"` Body HtmlBody `xml:"body"`}