How to simplify this Xpath expression ?
- by Stephan
Hi ,
I have the following XML code :
<root>
<a><l_desc/></a>
<b><l_desc>foo</l_desc></b>
<c><l_desc>bar</l_desc></c>
</root>
I want to match the l_desc nodes with a or b nodes as parent.
For now, i use this xpath expression : //a/l_desc/.. | //b/l_desc/..
I would prefer writing something like this : //(a|b)/l_desc/..
Unfortunately, this expression is invalid.
Do you have any idea for reducing the first expression ?
Stéphan