代码拉取完成,页面将自动刷新
// Copyright 2017 Baliance. All rights reserved.
//
// DO NOT EDIT: generated by gooxml ECMA-376 generator
//
// Use of this source code is governed by the terms of the Affero GNU General
// Public License version 3.0 as published by the Free Software Foundation and
// appearing in the file LICENSE included in the packaging of this file. A
// commercial license can be purchased by contacting sales@baliance.com.
package vml
import (
"encoding/xml"
"fmt"
"strconv"
)
type OfcTop struct {
OfcCT_StrokeChild
}
func NewOfcTop() *OfcTop {
ret := &OfcTop{}
ret.OfcCT_StrokeChild = *NewOfcCT_StrokeChild()
return ret
}
func (m *OfcTop) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns"}, Value: "urn:schemas-microsoft-com:office:office"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:o"}, Value: "urn:schemas-microsoft-com:office:office"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:r"}, Value: "http://schemas.openxmlformats.org/officeDocument/2006/relationships"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:s"}, Value: "http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:v"}, Value: "urn:schemas-microsoft-com:vml"})
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns:xml"}, Value: "http://www.w3.org/XML/1998/namespace"})
start.Name.Local = "o:top"
return m.OfcCT_StrokeChild.MarshalXML(e, start)
}
func (m *OfcTop) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
// initialize to default
m.OfcCT_StrokeChild = *NewOfcCT_StrokeChild()
for _, attr := range start.Attr {
if attr.Name.Space == "urn:schemas-microsoft-com:office:office" && attr.Name.Local == "href" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.HrefAttr = &parsed
continue
}
if attr.Name.Space == "urn:schemas-microsoft-com:office:office" && attr.Name.Local == "forcedash" {
m.ForcedashAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Space == "urn:schemas-microsoft-com:office:office" && attr.Name.Local == "title" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.TitleAttr = &parsed
continue
}
if attr.Name.Space == "urn:schemas-microsoft-com:office:office" && attr.Name.Local == "althref" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.AlthrefAttr = &parsed
continue
}
if attr.Name.Local == "imageaspect" {
m.ImageaspectAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "startarrow" {
m.StartarrowAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "linestyle" {
m.LinestyleAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "startarrowwidth" {
m.StartarrowwidthAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "joinstyle" {
m.JoinstyleAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "startarrowlength" {
m.StartarrowlengthAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "dashstyle" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.DashstyleAttr = &parsed
continue
}
if attr.Name.Local == "endarrow" {
m.EndarrowAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "filltype" {
m.FilltypeAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "endarrowwidth" {
m.EndarrowwidthAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "opacity" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.OpacityAttr = &parsed
continue
}
if attr.Name.Local == "color" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.ColorAttr = &parsed
continue
}
if attr.Name.Local == "insetpen" {
m.InsetpenAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "endarrowlength" {
m.EndarrowlengthAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "ext" {
m.ExtAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "endcap" {
m.EndcapAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "color2" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.Color2Attr = &parsed
continue
}
if attr.Name.Local == "imagealignshape" {
m.ImagealignshapeAttr.UnmarshalXMLAttr(attr)
continue
}
if attr.Name.Local == "weight" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.WeightAttr = &parsed
continue
}
if attr.Name.Local == "src" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.SrcAttr = &parsed
continue
}
if attr.Name.Local == "imagesize" {
parsed, err := attr.Value, error(nil)
if err != nil {
return err
}
m.ImagesizeAttr = &parsed
continue
}
if attr.Name.Local == "miterlimit" {
parsed, err := strconv.ParseFloat(attr.Value, 64)
if err != nil {
return err
}
m.MiterlimitAttr = &parsed
continue
}
if attr.Name.Local == "on" {
m.OnAttr.UnmarshalXMLAttr(attr)
continue
}
}
// skip any extensions we may find, but don't support
for {
tok, err := d.Token()
if err != nil {
return fmt.Errorf("parsing OfcTop: %s", err)
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
break
}
}
return nil
}
// Validate validates the OfcTop and its children
func (m *OfcTop) Validate() error {
return m.ValidateWithPath("OfcTop")
}
// ValidateWithPath validates the OfcTop and its children, prefixing error messages with path
func (m *OfcTop) ValidateWithPath(path string) error {
if err := m.OfcCT_StrokeChild.ValidateWithPath(path); err != nil {
return err
}
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。