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
Not support node array select. "span[2]"
Example: page.getHtml().xpath("span[2]/small/text()");
XPathParser.java add code, I suggest: private Evaluator consumePredicates(String queue) { // +++ start add code ++++ if(StringUtils.isNumericSpace(queue)) { return new XEvaluators.IsNthOfType(0, Integer.parseInt(queue.trim())); } // +++ end add code ++++ XTokenQueue predicatesQueue = new XTokenQueue(queue); EvaluatorStack evaluatorStack = new EvaluatorStack(); Operation currentOperation = null; predicatesQueue.consumeWhitespace(); while (!predicatesQueue.isEmpty()) { ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Not support node array select. "span[2]"
Example:
page.getHtml().xpath("span[2]/small/text()");
XPathParser.java add code, I suggest:
private Evaluator consumePredicates(String queue) {
// +++ start add code ++++
if(StringUtils.isNumericSpace(queue)) {
return new XEvaluators.IsNthOfType(0, Integer.parseInt(queue.trim()));
}
// +++ end add code ++++
XTokenQueue predicatesQueue = new XTokenQueue(queue);
EvaluatorStack evaluatorStack = new EvaluatorStack();
Operation currentOperation = null;
predicatesQueue.consumeWhitespace();
while (!predicatesQueue.isEmpty()) {
...
}
The text was updated successfully, but these errors were encountered: