本文整理汇总了Golang中github.com/apognu/xml/utils.NewDepthWatcher函数的典型用法代码示例。如果您正苦于以下问题:Golang NewDepthWatcher函数的具体用法?Golang NewDepthWatcher怎么用?Golang NewDepthWatcher使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewDepthWatcher函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: NewChannelExt
func NewChannelExt(manager extension.Manager) *Channel {
c := Channel{
Title: NewBasicElementExt(manager),
Link: NewBasicElementExt(manager),
Description: NewUnescapedContentExt(manager),
Language: NewBasicElementExt(manager),
Copyright: NewBasicElementExt(manager),
ManagingEditor: NewBasicElementExt(manager),
Webmaster: NewBasicElementExt(manager),
PubDate: NewDateExt(manager),
LastBuildDate: NewDateExt(manager),
Generator: NewBasicElementExt(manager),
Docs: NewBasicElementExt(manager),
Cloud: NewCloudExt(manager),
Ttl: NewBasicElementExt(manager),
Image: NewImageExt(manager),
Rating: NewBasicElementExt(manager),
SkipHours: NewBasicElementExt(manager),
SkipDays: NewBasicElementExt(manager),
depth: xmlutils.NewDepthWatcher(),
}
c.init()
c.Extension = extension.InitExtension("channel", manager)
return &c
}
开发者ID:apognu,项目名称:xml,代码行数:28,代码来源:channel.go
示例2: NewLink
func NewLink() *Link {
l := Link{depth: xmlutils.NewDepthWatcher()}
l.Href = xmlutils.NewElement("href", "", IsValidIRI)
l.Href.SetOccurence(xmlutils.NewOccurence("href", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
l.Rel = xmlutils.NewElement("rel", "alternate", xmlutils.Nop)
l.Rel.SetOccurence(xmlutils.NewOccurence("rel", xmlutils.UniqueValidator(AttributeDuplicated)))
l.Type = xmlutils.NewElement("type", "", IsValidMIME)
l.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.UniqueValidator(AttributeDuplicated)))
l.HrefLang = xmlutils.NewElement("hreflang", "", xmlutils.Nop)
l.HrefLang.SetOccurence(xmlutils.NewOccurence("hreflang", xmlutils.UniqueValidator(AttributeDuplicated)))
l.Title = xmlutils.NewElement("title", "", xmlutils.Nop)
l.Title.SetOccurence(xmlutils.NewOccurence("title", xmlutils.UniqueValidator(AttributeDuplicated)))
l.Length = xmlutils.NewElement("length", "", IsValidLength)
l.Length.SetOccurence(xmlutils.NewOccurence("length", xmlutils.UniqueValidator(AttributeDuplicated)))
l.InitCommonAttributes()
return &l
}
开发者ID:apognu,项目名称:xml,代码行数:25,代码来源:link.go
示例3: NewChannel
func NewChannel() *Channel {
c := Channel{
Title: NewBasicElement(),
Link: NewBasicElement(),
Description: NewUnescapedContent(),
Language: NewBasicElement(),
Copyright: NewBasicElement(),
ManagingEditor: NewBasicElement(),
Webmaster: NewBasicElement(),
PubDate: NewDate(),
LastBuildDate: NewDate(),
Generator: NewBasicElement(),
Docs: NewBasicElement(),
Cloud: NewCloud(),
Ttl: NewBasicElement(),
Image: NewImage(),
Rating: NewBasicElement(),
SkipHours: NewBasicElement(),
SkipDays: NewBasicElement(),
depth: xmlutils.NewDepthWatcher(),
}
c.init()
return &c
}
开发者ID:apognu,项目名称:xml,代码行数:27,代码来源:channel.go
示例4: NewDate
func NewDate() *Date {
d := Date{depth: xmlutils.NewDepthWatcher()}
d.depth.SetMaxDepth(1)
d.InitCommonAttributes()
return &d
}
开发者ID:apognu,项目名称:xml,代码行数:7,代码来源:dateconstruct.go
示例5: NewCategory
func NewCategory() *Category {
c := Category{depth: xmlutils.NewDepthWatcher()}
c.Domain = xmlutils.NewElement("domain", "", xmlutils.Nop)
c.Domain.SetOccurence(xmlutils.NewOccurence("domain", xmlutils.UniqueValidator(AttributeDuplicated)))
return &c
}
开发者ID:apognu,项目名称:xml,代码行数:8,代码来源:category.go
示例6: NewGuid
func NewGuid() *Guid {
g := Guid{depth: xmlutils.NewDepthWatcher()}
g.IsPermalink = xmlutils.NewElement("isPermalink", "true", xmlutils.Nop)
g.IsPermalink.SetOccurence(xmlutils.NewOccurence("isPermalink", xmlutils.UniqueValidator(AttributeDuplicated)))
return &g
}
开发者ID:apognu,项目名称:xml,代码行数:8,代码来源:guid.go
示例7: NewBasicElement
func NewBasicElement(parent xmlutils.Visitor) *BasicElement {
b := BasicElement{Parent: parent, depth: xmlutils.NewDepthWatcher()}
b.depth.SetMaxDepth(1)
b.InitCommonAttributes()
return &b
}
开发者ID:apognu,项目名称:xml,代码行数:8,代码来源:basicelement.go
示例8: NewSource
func NewSource() *Source {
s := Source{depth: xmlutils.NewDepthWatcher()}
s.Url = xmlutils.NewElement("url", "", xmlutils.Nop)
s.Url.SetOccurence(xmlutils.NewOccurence("url", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
return &s
}
开发者ID:apognu,项目名称:xml,代码行数:8,代码来源:source.go
示例9: NewIcon
func NewIcon() *Icon {
i := Icon{depth: xmlutils.NewDepthWatcher()}
i.Iri = xmlutils.NewElement("iri", "", IsValidIRI)
i.InitCommonAttributes()
i.depth.SetMaxDepth(1)
return &i
}
开发者ID:apognu,项目名称:xml,代码行数:10,代码来源:icon.go
示例10: NewId
func NewId() *Id {
i := Id{depth: xmlutils.NewDepthWatcher()}
i.Content = xmlutils.NewElement("iri", "", IsAbsoluteIRI)
i.InitCommonAttributes()
i.depth.SetMaxDepth(1)
return &i
}
开发者ID:apognu,项目名称:xml,代码行数:10,代码来源:id.go
示例11: NewLogo
func NewLogo() *Logo {
l := Logo{depth: xmlutils.NewDepthWatcher()}
l.Iri = xmlutils.NewElement("iri", "", IsValidIRI)
l.InitCommonAttributes()
l.depth.SetMaxDepth(1)
return &l
}
开发者ID:apognu,项目名称:xml,代码行数:10,代码来源:logo.go
示例12: NewPerson
func NewPerson() *Person {
p := Person{depth: xmlutils.NewDepthWatcher()}
p.Name = NewBasicElement(&p)
p.Uri = NewBasicElement(&p)
p.Email = NewBasicElement(&p)
p.init()
return &p
}
开发者ID:apognu,项目名称:xml,代码行数:11,代码来源:personconstruct.go
示例13: NewOutOfLineContent
func NewOutOfLineContent() *OutOfLineContent {
o := OutOfLineContent{depth: xmlutils.NewDepthWatcher()}
o.Type = xmlutils.NewElement("type", "", outOfLineTypeIsValid)
o.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
o.Src = xmlutils.NewElement("src", "", IsValidIRI)
o.Src.SetOccurence(xmlutils.NewOccurence("src", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
o.depth.SetMaxDepth(1)
return &o
}
开发者ID:apognu,项目名称:xml,代码行数:12,代码来源:outoflinecontent.go
示例14: NewPersonExt
func NewPersonExt(manager extension.Manager) *Person {
p := Person{depth: xmlutils.NewDepthWatcher()}
p.Name = NewBasicElementExt(&p, manager)
p.Uri = NewBasicElementExt(&p, manager)
p.Email = NewBasicElementExt(&p, manager)
p.Extension = extension.InitExtension("person", manager)
p.init()
return &p
}
开发者ID:apognu,项目名称:xml,代码行数:13,代码来源:personconstruct.go
示例15: NewImage
func NewImage() *Image {
i := Image{depth: xmlutils.NewDepthWatcher()}
i.Url = NewBasicElement()
i.Title = NewBasicElement()
i.Link = NewBasicElement()
i.Width = NewBasicElement()
i.Height = NewBasicElement()
i.Description = NewBasicElement()
i.init()
return &i
}
开发者ID:apognu,项目名称:xml,代码行数:14,代码来源:image.go
示例16: NewEnclosure
func NewEnclosure() *Enclosure {
e := Enclosure{depth: xmlutils.NewDepthWatcher()}
e.Url = xmlutils.NewElement("url", "", xmlutils.Nop)
e.Url.SetOccurence(xmlutils.NewOccurence("url", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
e.Length = xmlutils.NewElement("length", "", xmlutils.Nop)
e.Length.SetOccurence(xmlutils.NewOccurence("length", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
e.Type = xmlutils.NewElement("type", "", xmlutils.Nop)
e.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated)))
return &e
}
开发者ID:apognu,项目名称:xml,代码行数:14,代码来源:enclosure.go
示例17: NewGenerator
func NewGenerator() *Generator {
g := Generator{depth: xmlutils.NewDepthWatcher()}
g.Uri = xmlutils.NewElement("uri", "", IsValidIRI)
g.Uri.SetOccurence(xmlutils.NewOccurence("uri", xmlutils.UniqueValidator(AttributeDuplicated)))
g.Version = xmlutils.NewElement("version", "", xmlutils.Nop)
g.Version.SetOccurence(xmlutils.NewOccurence("version", xmlutils.UniqueValidator(AttributeDuplicated)))
g.InitCommonAttributes()
g.depth.SetMaxDepth(1)
return &g
}
开发者ID:apognu,项目名称:xml,代码行数:14,代码来源:generator.go
示例18: NewImageExt
func NewImageExt(manager extension.Manager) *Image {
i := Image{depth: xmlutils.NewDepthWatcher()}
i.Url = NewBasicElementExt(manager)
i.Title = NewBasicElementExt(manager)
i.Link = NewBasicElementExt(manager)
i.Width = NewBasicElementExt(manager)
i.Height = NewBasicElementExt(manager)
i.Description = NewBasicElementExt(manager)
i.init()
i.Extension = extension.InitExtension("image", manager)
return &i
}
开发者ID:apognu,项目名称:xml,代码行数:15,代码来源:image.go
示例19: newInReplyTo
func newInReplyTo() *InReplyTo {
i := InReplyTo{depth: xmlutils.NewDepthWatcher()}
i.Ref = xmlutils.NewElement("ref", "", atom.IsAbsoluteIRI)
i.Ref.SetOccurence(xmlutils.NewOccurence("ref", xmlutils.ExistsAndUniqueValidator(atom.MissingAttribute, atom.AttributeDuplicated)))
i.Href = xmlutils.NewElement("href", "", atom.IsValidIRI)
i.Href.SetOccurence(xmlutils.NewOccurence("href", xmlutils.UniqueValidator(atom.AttributeDuplicated)))
i.Type = xmlutils.NewElement("type", "", xmlutils.Nop)
i.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.UniqueValidator(atom.AttributeDuplicated)))
i.Source = xmlutils.NewElement("source", "", atom.IsValidIRI)
i.Source.SetOccurence(xmlutils.NewOccurence("source", xmlutils.UniqueValidator(atom.AttributeDuplicated)))
return &i
}
开发者ID:apognu,项目名称:xml,代码行数:17,代码来源:inreplyto.go
示例20: NewFeed
func NewFeed() *Feed {
f := Feed{
Generator: NewGenerator(),
Icon: NewIcon(),
Id: NewId(),
Logo: NewLogo(),
Rights: NewTextConstruct(),
Subtitle: NewTextConstruct(),
Title: NewTextConstruct(),
Updated: NewDate(),
depth: xmlutils.NewDepthWatcher(),
}
f.init()
return &f
}
开发者ID:apognu,项目名称:xml,代码行数:18,代码来源:feed.go
注:本文中的github.com/apognu/xml/utils.NewDepthWatcher函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论