Versions in this module Expand all Collapse all v0 v0.0.2 Dec 22, 2023 v0.0.1 Dec 19, 2023 Changes in this version + const NoIndent + var ErrXML = errors.New("etree: invalid XML format") + type Attr struct + Key string + Space string + Value string + type CData struct + Value string + func (this *CData) Parent() *Element + type CharData struct + Data string + func NewCharData(data string) *CharData + func (c *CharData) Parent() *Element + type Comment struct + Data string + func NewComment(comment string) *Comment + func (c *Comment) Parent() *Element + type Directive struct + Data string + func NewDirective(data string) *Directive + func (d *Directive) Parent() *Element + type Document struct + WriteSettings WriteSettings + func NewDocument() *Document + func (d *Document) Copy() *Document + func (d *Document) Indent(spaces int) + func (d *Document) IndentTabs() + func (d *Document) ReadFrom(r io.Reader) (n int64, err error) + func (d *Document) ReadFromBytes(b []byte) error + func (d *Document) ReadFromFile(filename string) error + func (d *Document) ReadFromString(s string) error + func (d *Document) Root() *Element + func (d *Document) SetRoot(e *Element) + func (d *Document) WriteTo(w io.Writer) (n int64, err error) + func (d *Document) WriteToBytes() (b []byte, err error) + func (d *Document) WriteToFile(filename string) error + func (d *Document) WriteToString() (s string, err error) + type Element struct + Attr []Attr + Child []Token + Space string + Tag string + func NewElement(tag string) *Element + func (e *Element) AddChild(t Token) + func (e *Element) ChildElements() []*Element + func (e *Element) Copy() *Element + func (e *Element) CreateAttr(key, value string) *Attr + func (e *Element) CreateCharData(data string) *CharData + func (e *Element) CreateComment(comment string) *Comment + func (e *Element) CreateDirective(data string) *Directive + func (e *Element) CreateElement(tag string) *Element + func (e *Element) CreateProcInst(target, inst string) *ProcInst + func (e *Element) FindElement(path string) *Element + func (e *Element) FindElementPath(path Path) *Element + func (e *Element) FindElements(path string) []*Element + func (e *Element) FindElementsPath(path Path) []*Element + func (e *Element) InsertChild(ex Token, t Token) + func (e *Element) Parent() *Element + func (e *Element) RemoveAttr(key string) *Attr + func (e *Element) RemoveChild(t Token) Token + func (e *Element) SelectAttr(key string) *Attr + func (e *Element) SelectAttrValue(key, dflt string) string + func (e *Element) SelectElement(tag string) *Element + func (e *Element) SelectElements(tag string) []*Element + func (e *Element) SetText(text string) + func (e *Element) Text() string + func (e *Element) WriteCData(text string) + type ErrPath string + func (err ErrPath) Error() string + type Path struct + func CompilePath(path string) (Path, error) + func MustCompilePath(path string) Path + type ProcInst struct + Inst string + Target string + func NewProcInst(target, inst string) *ProcInst + func (p *ProcInst) Parent() *Element + type Token interface + Parent func() *Element + type WriteSettings struct + CanonicalAttrVal bool + CanonicalEndTags bool + CanonicalText bool