1 Star 1 Fork 0

JNan-QQ / simple-go-docx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
document.go 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
jiangnan 提交于 2023-03-31 13:08 . create simple-go-docx
package document
import (
"encoding/xml"
)
// Document docx对象
type Document struct {
XMLName xml.Name `xml:"w:document"`
XmlW string `xml:"xmlns:w,attr"` // cannot be unmarshalled in
XmlR string `xml:"xmlns:r,attr,omitempty"` // cannot be unmarshalled in
XmlWp string `xml:"xmlns:wp,attr,omitempty"` // cannot be unmarshalled in
XmlWps string `xml:"xmlns:wps,attr,omitempty"` // cannot be unmarshalled in
XmlWpc string `xml:"xmlns:wpc,attr,omitempty"` // cannot be unmarshalled in
XmlWpg string `xml:"xmlns:wpg,attr,omitempty"` // cannot be unmarshalled in
Body Body `xml:"w:body"`
}
// Body <w:body>
// Body.Items 文本内容格式
type Body struct {
Items []interface{}
}
// Relationships ...
type Relationships struct {
Xmlns string `xml:"xmlns,attr"`
Relationship []Relationship
}
// Relationship ...
type Relationship struct {
ID string `xml:"Id,attr"`
Type string `xml:"Type,attr"`
Target string `xml:"Target,attr"`
TargetMode string `xml:"TargetMode,attr,omitempty"`
}
Go
1
https://gitee.com/jn-qq/simple-go-docx.git
git@gitee.com:jn-qq/simple-go-docx.git
jn-qq
simple-go-docx
simple-go-docx
v1.0.1

搜索帮助