On Nov 8, 5:31 am, Martin Honnen <mahotr... (AT) yahoo (DOT) de> wrote:
Quote:
Brendan CM wrote:
Here is an example:
root
container
elem><tag="start" /></elem
^^^^^^^^^^^
What is that? That is not well-formed XML.
Okay, it was just an example, here is some well formed XML:
|
<root>
<container>
<elem><tag v="start"></tag></elem>
<elem><val>Keep this one</val></elem>
<elem><tag v="stop"></tag></elem>
<elem><val>Discard Me</val></elem>
<elem><tag v="start"></tag></elem>
<elem><val>Keep this one</val></elem>
<elem><tag v="stop"></tag></elem>
</container>
</root>
Same question applies though, surely someone here knows that last
little bit of XPath that I'm missing.
This is what I've got so far: //elem[tag[@v="start"]]/following-
sibling::*[following-sibling::*/tag[@v="stop"]]
And it doesn't work.