Documentation ¶
Overview ¶
XML DOM processing for Golang, supports xpath query
Index ¶
- Constants
- type Attribute
- type Document
- type Namespace
- type Node
- func (n *Node) AppendChild(c *Node) *Node
- func (n *Node) CreateNode(name string) *Node
- func (n *Node) CreateNodeAt(index int, name string) *Node
- func (n *Node) FindByID(id string) *Node
- func (n *Node) FindByName(name string) []*Node
- func (n *Node) FindOneByName(name string) *Node
- func (n *Node) FirstChild() *Node
- func (n *Node) GetAttribute(name string) *Attribute
- func (n *Node) GetAttributeValue(name string) string
- func (n *Node) GetChild(name string) *Node
- func (n *Node) GetChildren(name string) []*Node
- func (n *Node) IndexNode(c *Node) int
- func (n *Node) LastChild() *Node
- func (n *Node) NextSibling() *Node
- func (n *Node) PrevSibling() *Node
- func (n *Node) RemoveAttribute(name string) *Node
- func (n *Node) RemoveChild(c *Node) *Node
- func (n *Node) Root() *Node
- func (n *Node) SetAttributeValue(name string, value string) *Node
- func (n *Node) XML() string
- func (n *Node) XMLPretty() string
Constants ¶
View Source
const (
DEFAULT_XML_HEADER = `<?xml version="1.0" encoding="UTF-8"?>`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
func NewDocument ¶
type Node ¶
type Node struct { Document *Document Parent *Node NS *Namespace Name string Attributes []*Attribute Children []*Node Text string }
func (*Node) AppendChild ¶
func (*Node) CreateNode ¶
func (*Node) FindByName ¶
func (*Node) FindOneByName ¶
func (*Node) FirstChild ¶
func (*Node) GetAttribute ¶
func (*Node) GetAttributeValue ¶
func (*Node) GetChildren ¶
func (*Node) NextSibling ¶
func (*Node) PrevSibling ¶
func (*Node) RemoveAttribute ¶
func (*Node) RemoveChild ¶
Click to show internal directories.
Click to hide internal directories.