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

Function build

build.go:701–718  ·  view source on GitHub ↗

build builds a specified XPath expressions expr.

(expr string, namespaces map[string]string)

Source from the content-addressed store, hash-verified

699
700// build builds a specified XPath expressions expr.
701func build(expr string, namespaces map[string]string) (q query, err error) {
702 defer func() {
703 if e := recover(); e != nil {
704 switch x := e.(type) {
705 case string:
706 err = errors.New(x)
707 case error:
708 err = x
709 default:
710 err = errors.New("unknown panic")
711 }
712 }
713 }()
714 root := parse(expr, namespaces)
715 b := &builder{}
716 props := builderProps.None
717 return b.processNode(root, flagsEnum.None, &props)
718}

Callers 2

CompileFunction · 0.85
CompileWithNSFunction · 0.85

Calls 2

processNodeMethod · 0.95
parseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…