xpath
xpath copied to clipboard
string comparison size error
use xmlquery find func, use string comparison size exist error, i think cmpStringStringF have bug。
example:
test data:
`// operator.go func cmpNodeSetString(t iterator, op string, m, n interface{}) bool {
a := m.(query)
b := n.(string)
for {
node := a.Select(t)
if node == nil {
break
}
// this is errror
if cmpStringStringF(op, b, node.Value()) {
return true
}
// this is should
//if cmpStringStringF(op, node.Value(),b) {
// return true
//}
}
return false
}`
Sorry, I need more test example, I cannot found any problem from these code.