Versions in this module Expand all Collapse all v1 v1.1.0 Nov 11, 2024 v1.0.0 Oct 3, 2024 Changes in this version + const DefaultDeclaration + func NeedCDATA(s string) bool + type Attribute struct + Name string + Prefix string + Value string + func (a Attribute) IsNamespace() bool + func (a Attribute) String() string + type CDATA string + func NewCDATA(s string) *CDATA + func (c CDATA) String() string + func (c CDATA) Value() (string, error) + type Comment string + func NewComment(s string) *Comment + func (c Comment) String() string + func (c Comment) Value() (string, error) + type Document struct + Declaration string + func NewDocument(t *Tag) *Document + func NewDocumentFromReader(r io.Reader) (*Document, error) + func (d *Document) AddAfter(add Element, after Element) error + func (d *Document) AddBefore(add Element, before Element) error + func (d *Document) Remove(remove Element) error + func (d Document) Marshal() ([]byte, error) + func (d Document) Root() *Tag + type Element interface + String func() string + Value func() (string, error) + type Search []*Tag + func (se Search) ByName(s string) Search + func (se Search) One() *Tag + type Tag struct + Attributes []*Attribute + Name string + Prefix string + func NewTag(name string) *Tag + func (t *Tag) AddAfter(add Element, after Element) error + func (t *Tag) AddAttribute(name string, value string, prefix string) *Tag + func (t *Tag) AddBefore(add Element, before Element) error + func (t *Tag) AddNamespace(name string, value string) *Tag + func (t *Tag) Marshal() ([]byte, error) + func (t *Tag) Remove(remove Element) error + func (t *Tag) Search() Search + func (t Tag) AvailableNamespaces() []Attribute + func (t Tag) Elements() []Element + func (t Tag) GetNamespace(prefix string) (string, error) + func (t Tag) GetPrefix(ns string) (string, error) + func (t Tag) String() string + func (t Tag) Tags() []*Tag + func (t Tag) Value() (string, error) + type Value string + func NewValue(s string) *Value + func (v Value) String() string + func (v Value) Value() (string, error) + type XPath []string + func (x XPath) String() string