xml

package
v0.0.0-...-191e258 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2014 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChild

func AddChild(parent, child Node)

Types

type Attr

type Attr struct {
	Name  Name
	Value string
}

func (Attr) String

func (a Attr) String() string

type Attrs

type Attrs []Attr

func (*Attrs) Add

func (attrs *Attrs) Add(key, value string)

func (Attrs) String

func (as Attrs) String() string

type CharData

type CharData bytesNode

func (CharData) String

func (d CharData) String() string

type Comment

type Comment bytesNode

func (Comment) String

func (c Comment) String() string

type Dirivative

type Dirivative bytesNode

func (Dirivative) String

func (d Dirivative) String() string

type Document

type Document struct {
	Child Nodes
}

func Parse

func Parse(r io.Reader) (*Document, error)

func (Document) String

func (d Document) String() string

TODO: use writer instead of Stringer

type Element

type Element struct {
	Name  Name
	Attr  Attrs
	Child Nodes
}

func (*Element) GetAttr

func (e *Element) GetAttr(key string) *string

func (*Element) SetAttr

func (e *Element) SetAttr(key, value string)

func (Element) String

func (e Element) String() string

type Name

type Name struct {
	Space, Local string
}

func (Name) String

func (n Name) String() string

type Node

type Node interface {
	fmt.Stringer
}

type Nodes

type Nodes []Node

func (*Nodes) Add

func (nodes *Nodes) Add(node Node)

func (Nodes) String

func (ns Nodes) String() string

type ProcInst

type ProcInst struct {
	Target string
	Inst   []byte
}

func (ProcInst) String

func (pi ProcInst) String() string

Jump to

Keyboard shortcuts

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