MCPcopy Create free account
hub / github.com/antchfx/xpath / appendNode

Method appendNode

xpath_test.go:571–580  ·  view source on GitHub ↗
(data string, typ NodeType)

Source from the content-addressed store, hash-verified

569}
570
571func (n *TNode) appendNode(data string, typ NodeType) *TNode {
572 m := createNode(data, typ)
573 m.Parent = n.Parent
574 n.NextSibling = m
575 m.PrevSibling = n
576 if n.Parent != nil {
577 n.Parent.LastChild = m
578 }
579 return m
580}
581
582func (n *TNode) addAttribute(k, v string) {
583 n.Attr = append(n.Attr, Attribute{k, v})

Callers

nothing calls this directly

Calls 1

createNodeFunction · 0.85

Tested by

no test coverage detected