MustCompile compiles an XPath expression string and ignored error.
(expr string)
| 153 | |
| 154 | // MustCompile compiles an XPath expression string and ignored error. |
| 155 | func MustCompile(expr string) *Expr { |
| 156 | exp, err := Compile(expr) |
| 157 | if err != nil { |
| 158 | return &Expr{s: expr, q: nopQuery{}} |
| 159 | } |
| 160 | return exp |
| 161 | } |
| 162 | |
| 163 | // CompileWithNS compiles an XPath expression string, using given namespaces map. |
| 164 | func CompileWithNS(expr string, namespaces map[string]string) (*Expr, error) { |
searching dependent graphs…