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

Method createChildNode

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

Source from the content-addressed store, hash-verified

556}
557
558func (n *TNode) createChildNode(data string, typ NodeType) *TNode {
559 m := createNode(data, typ)
560 m.Parent = n
561 if n.FirstChild == nil {
562 n.FirstChild = m
563 } else {
564 n.LastChild.NextSibling = m
565 m.PrevSibling = n.LastChild
566 }
567 n.LastChild = m
568 return m
569}
570
571func (n *TNode) appendNode(data string, typ NodeType) *TNode {
572 m := createNode(data, typ)

Callers 15

TestNamespacePrefixQueryFunction · 0.80
TestNodeTypeFunction · 0.80
createBookExampleFunction · 0.80
createEmployeeExampleFunction · 0.80
createHtmlExampleFunction · 0.80
createMyBookExampleFunction · 0.80
Test_func_string_emptyFunction · 0.80
Test_descendant_issueFunction · 0.80

Calls 1

createNodeFunction · 0.85

Tested by

no test coverage detected