We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versions:
This test is failing:
func TestXPathAnd(t *testing.T) { body := ` <top> <child><name>Child1</name> <toy>A</toy> <toy>B</toy> </child> </top>` root, err := xmlquery.Parse(strings.NewReader(body)) assert.NoError(t, err) expr, err := xpath.Compile(`/top/child[toy[text() = "A"] and toy[text()="B"]]/name/text()`) assert.NoError(t, err) result := expr.Evaluate(xmlquery.CreateXPathNavigator(root)) switch rt := result.(type) { case *xpath.NodeIterator: assert.True(t, rt.MoveNext()). // Fails fmt.Println("Value:", rt.Current().Value()) } }
Compare this with standard macos xpath utility:
xpath -e '/top/child[toy[text() = "A"] and toy[text()="B"]]/name/text()' <top> <child><name>Child1</name> <toy>A</toy> <toy>B</toy> </child> </top> Found 1 nodes in stdin: -- NODE -- Child1
The text was updated successfully, but these errors were encountered:
2afacf4
No branches or pull requests
Versions:
This test is failing:
Compare this with standard macos xpath utility:
The text was updated successfully, but these errors were encountered: