func (x *XMLParser) CompileXpath(expr string) (*xpath.Expr, error) {
	exp, err := xpath.Compile(expr)
	if err != nil {
		return nil, err
	}
	return exp, nil
}
Compile the given xpath expression
package xmlparser
import (
	"github.com/tamerh/xpath"
)
func (x *XMLParser) CreateXPathNavigator(top *XMLElement) *XmlNodeNavigator {
	return &XmlNodeNavigator{curr: top, root: top, attr: -1}
}