Suppose I have the following XML:
<values>
<value>
<ci_val_id>356</ci_val_id>
<ci_val_value>A</ci_val_value>
</value>
<value>
<ci_val_id>357</ci_val_id>
<ci_val_value>B</ci_val_value>
</value>
<value>
<ci_val_id>358</ci_val_id>
<ci_val_value>E</ci_val_value>
</value>
</values>
How to I find the correct ci_val_id node for a specific value (e.g.: "E").
For example in this code:
Code:
var xml; // (is the XML from above)
var node = Ext.DomQuery.selectNode('ci_value:nodeValue("E")', xml);
// so far so good, node is pointing to the right node, now I want to know the ci_val_id for that record:
var ci_val_id_node = node.prev(); // This is where it goes wrong! prev() is not a valid function!
I also tried other DOM queries, like:
var node = Ext.DomQuery.selectNode('value:has(ci_value:nodeValue('+rec.get('ci_value')+'))', rec.node);
But they don't seem to work either.