Android browser not support XpathEvaluator Object.
I'm trying to replace with Xpath with JQuery.
For example,
01. oRoot.selectSingleNode("step/person");
-> $(oRoot).find("step person");
02. oRoot.selectSingleNode("step/person[@color='red' and age='20']");
-> $(oRoot).find("step person[color='red'][age=[20]");
But, I don't know how change below code?
01. oRoot.selectSingleNode("step/person[@color='red' or @color='black']");
02. oRoot.selectSingleNode("step/person[taskinfo/status='holding']");
Do you know apply OR operation to jQuery Code?
Do you konw apply one depth attribute to jQuery Code?
or Do you have other good solution?
There aren't conditional operators in jquery selectors, you just need to separate the selectors with a comma.
More on jQuery selectors http://api.jquery.com/category/selectors/
You can easily apply an attribute using jQuery's
.attr()
:More on jQuery attr: http://api.jquery.com/attr/