xml

package
v0.0.0-...-a1a65ea Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloseTag interface{}
View Source
var Config = struct {
	Indent string
}{}

Functions

func Element

func Element(tag string, args ...interface{}) view.View

func WriteAttrib

func WriteAttrib(writer io.Writer, name, value interface{})

Types

type View

type View struct {
	Content interface{}
	Header  bool
	Indent  string
}

func NewView

func NewView(content interface{}) *View

func NewViewIndent

func NewViewIndent(content interface{}, indent string) *View

func (*View) Render

func (v *View) Render(ctx *view.Context) (err error)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(writer io.Writer) *Writer

func (*Writer) Attrib

func (self *Writer) Attrib(name string, value ...interface{}) *Writer

value will be HTML escaped and concaternated

func (*Writer) AttribFlag

func (self *Writer) AttribFlag(name string, flag bool) *Writer

AttribFlag writes a name="name" attribute if flag is true, else nothing will be written.

func (*Writer) AttribIfNotDefault

func (self *Writer) AttribIfNotDefault(name string, value interface{}) *Writer

func (*Writer) CloseTag

func (self *Writer) CloseTag() *Writer

func (*Writer) CloseTagAlways

func (self *Writer) CloseTagAlways() *Writer

Creates an explicit close tag, even if there is no content

func (*Writer) Content

func (self *Writer) Content(s string) *Writer

func (*Writer) EscapeContent

func (self *Writer) EscapeContent(s string) *Writer

func (*Writer) OpenTag

func (self *Writer) OpenTag(tag string) *Writer

func (*Writer) Printf

func (self *Writer) Printf(format string, args ...interface{}) *Writer

func (*Writer) PrintfEscape

func (self *Writer) PrintfEscape(format string, args ...interface{}) *Writer

func (*Writer) Reset

func (self *Writer) Reset()

func (*Writer) Write

func (self *Writer) Write(p []byte) (n int, err error)

implements io.Writer

func (*Writer) WriteXMLHeader

func (self *Writer) WriteXMLHeader() *Writer

Jump to

Keyboard shortcuts

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