node

package
v2.0.0-...-c05e6ee Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeHTML

func DecodeHTML(x string) string

Types

type Node

type Node struct {
	XMLName  xml.Name
	Attrs    []xml.Attr `xml:",any,attr"`
	Content  []byte     `xml:",innerxml"`
	Children []*Node    `xml:",any"`
	// contains filtered or unexported fields
}

func New

func New(name []byte) *Node

func NewS

func NewS(name string) *Node

func NewXML

func NewXML(name []byte) *Node

func NewXMLS

func NewXMLS(name string) *Node

func (*Node) AddAttr

func (n *Node) AddAttr(attr xml.Attr)

func (*Node) AddChild

func (n *Node) AddChild(child *Node)

func (*Node) Copy

func (n *Node) Copy() *Node

func (*Node) FlatList

func (n *Node) FlatList(list *[]string, prefix string)

func (*Node) GetAllChildContentS

func (n *Node) GetAllChildContentS() []string

func (*Node) GetAllChildNamesS

func (n *Node) GetAllChildNamesS() []string

func (*Node) GetAttr

func (n *Node) GetAttr(name string) (xml.Attr, bool)

func (*Node) GetAttrValueS

func (n *Node) GetAttrValueS(name string) (string, bool)

func (*Node) GetChild

func (n *Node) GetChild(name []byte) *Node

func (*Node) GetChildByContent

func (n *Node) GetChildByContent(content string) *Node

GetChildByContent Compare child content

func (*Node) GetChildContent

func (n *Node) GetChildContent(name []byte) []byte

func (*Node) GetChildContentS

func (n *Node) GetChildContentS(name string) string

func (*Node) GetChildS

func (n *Node) GetChildS(name string) *Node

func (*Node) GetChildren

func (n *Node) GetChildren() []*Node

func (*Node) GetContent

func (n *Node) GetContent() []byte

func (*Node) GetContentS

func (n *Node) GetContentS() string

func (*Node) GetName

func (n *Node) GetName() []byte

func (*Node) GetNameS

func (n *Node) GetNameS() string

func (*Node) GetParent

func (n *Node) GetParent() *Node

func (*Node) GetXMLNameS

func (n *Node) GetXMLNameS() string

func (*Node) HasChild

func (n *Node) HasChild(name []byte) bool

func (*Node) HasChildS

func (n *Node) HasChildS(name string) bool

func (*Node) Merge

func (n *Node) Merge(subtemplate *Node, skipOverwrite []string)

Merge method will merge the subtemplate into the receiver, modifying the receiver in-place. skipOverwrite is a readonly list of keys that will not be overwritten in the receiver.

func (*Node) NewAttrS

func (n *Node) NewAttrS(name, value string)

func (*Node) NewChild

func (n *Node) NewChild(name, content []byte) *Node

func (*Node) NewChildS

func (n *Node) NewChildS(name, content string) *Node

func (*Node) PopChild

func (n *Node) PopChild(name []byte) *Node

func (*Node) PopChildS

func (n *Node) PopChildS(name string) *Node

func (*Node) PreprocessTemplate

func (n *Node) PreprocessTemplate()

func (*Node) Print

func (n *Node) Print(depth int) string

func (*Node) SearchChildren

func (n *Node) SearchChildren(path []string) []*Node

func (*Node) SearchContent

func (n *Node) SearchContent(prefix []string, paths [][]string) ([]string, bool)

func (*Node) SetChildContentS

func (n *Node) SetChildContentS(name, content string)

func (*Node) SetContent

func (n *Node) SetContent(content []byte)

func (*Node) SetContentS

func (n *Node) SetContentS(content string)

func (*Node) SetName

func (n *Node) SetName(name []byte)

func (*Node) SetNameS

func (n *Node) SetNameS(name string)

func (*Node) SetXMLNameS

func (n *Node) SetXMLNameS(name string)

func (*Node) Union

func (n *Node) Union(source *Node)

func (*Node) UnmarshalXML

func (n *Node) UnmarshalXML(dec *xml.Decoder, root xml.StartElement) error

Jump to

Keyboard shortcuts

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