xml

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenWriteTagWithSubtags

func GenWriteTagWithSubtags(tag string, subtags [][2]string, post func(xw *XmlWriter) error) func(xw *XmlWriter) error

func NewStartElementSimple

func NewStartElementSimple(name string) xml.StartElement

Returns a StartElement that has no attributes and resides in the default namespace

func WriteTagWithSubtags

func WriteTagWithSubtags(xw *XmlWriter, tag string, subtags [][2]string, post func(*XmlWriter) error) error

Types

type XmlWriter

type XmlWriter struct {
	*xml.Encoder
	// contains filtered or unexported fields
}

func NewXmlWriter

func NewXmlWriter(w io.Writer) *XmlWriter

func (*XmlWriter) CloseAllElements

func (r *XmlWriter) CloseAllElements() error

func (*XmlWriter) CloseElement

func (r *XmlWriter) CloseElement() error

func (*XmlWriter) EncodeToken

func (r *XmlWriter) EncodeToken(t xml.Token) error

func (*XmlWriter) EncodeTokens

func (r *XmlWriter) EncodeTokens(tokens ...xml.Token) error

func (*XmlWriter) OpenElements

func (r *XmlWriter) OpenElements() int

func (*XmlWriter) WriteText

func (r *XmlWriter) WriteText(b []byte) error

Xml-escapes b, then writes its content to a text node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL