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

Function TestMissingNamespace

parse_test.go:320–329  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

318}
319
320func TestMissingNamespace(t *testing.T) {
321 s := `<root>
322 <myns:child id="1">value 1</myns:child>
323 <myns:child id="2">value 2</myns:child>
324 </root>`
325 _, err := Parse(strings.NewReader(s))
326 if err == nil {
327 t.Fatal("err is nil, want got invalid XML document")
328 }
329}
330
331func TestTooNested(t *testing.T) {
332 s := `<?xml version="1.0" encoding="UTF-8"?>

Callers

nothing calls this directly

Calls 1

ParseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…