diff --git a/README.md b/README.md index 8b6364c..23df104 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,18 @@ This is a variant optimized and expanded by fumiama. The original repo is [gonfv The Introduction above is copied from the original repo. I had evolved that repo again to fit my needs. Here are the supported functions now. - [x] Parse and save document -- [x] Edit simple text (color, size, alignment, ...) +- [x] Edit text (color, size, alignment, link, ...) - [x] Edit picture - [x] Edit table +- [x] Edit shape +- [x] Edit canvas +- [x] Edit group + +## Quick Start +```bash +go run cmd/main/main.go -u +``` +And you will see two files generated under `pwd` with the same contents as below. ## License diff --git a/structdoc.go b/structdoc.go index 5d7a852..642ac8f 100644 --- a/structdoc.go +++ b/structdoc.go @@ -101,7 +101,7 @@ func (b *Body) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { // Document type Document struct { - XMLName xml.Name `xml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main document"` + 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