Friday, 10 June 2016

XML : Extract nodes between two nodes from xml

I have an xml file:

  <dl> some text    <dt>      other text    </dt>  </dl>  <h1>    <a>starting here</a>  </h1>    <dl>foo    <dt>      bar    </dt>  </dt>    <h1>    <a>Ending here</>  </h1>    <dl>foo    <dt>      bar    </dt>  </dt>    

Now I'd like to select the <dl> node (with its children) between the <h1> tags.

I have tried various combinations of following, following-sibling but have had no success.

Can anyone help me?

No comments:

Post a Comment