feat(element,ipub): new element package to take care of XML Marshalling and Unmarshalling
This commit is contained in:
22
ipub/element/sections.go
Normal file
22
ipub/element/sections.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package element
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
type Section struct {
|
||||
XMLName xml.Name `xml:"html"`
|
||||
Body Body `xml:"body"`
|
||||
}
|
||||
|
||||
type Body struct {
|
||||
XMLName xml.Name `xml:"body"`
|
||||
Test string `xml:"test,attr"`
|
||||
}
|
||||
|
||||
type Paragraph struct {
|
||||
XMLName xml.Name `xml:"p"`
|
||||
DataElement ElementKind `xml:"data-ipub-element,attr"`
|
||||
Test string `xml:"test,attr"`
|
||||
|
||||
Text string `xml:",chardata"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user