MCPcopy Create free account
hub / github.com/antchfx/xmlquery / TestMissingTextNodes

Function TestMissingTextNodes

query_test.go:163–172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestMissingTextNodes(t *testing.T) {
164 doc := loadXML(`
165 <?xml version="1.0" encoding="utf-8"?>
166 <corpus><p>Lorem <a>ipsum</a> dolor</p></corpus>
167 `)
168 results := Find(doc, "//text()")
169 if len(results) != 3 {
170 t.Fatalf("Expected text nodes 3, got %d", len(results))
171 }
172}

Callers

nothing calls this directly

Calls 2

loadXMLFunction · 0.85
FindFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…