Selecting nodes between empty elements
Posted: Fri Jun 05, 2009 11:42 am
Hello everyone,
Could anyone help with this little puzzle which I haven't been about to solve.
I've got an XML file with something like this in it:-
<p>
<pb/>
</p>
<p>3 Prayers.</p>
<p>The Senate.</p>
<p>Speaker. 4</p>
<p/>
<p>
<pb/>
</p>
The <pb/> elements are empty but mark page breaks. What I would like to do is work out the word count for each page - ie for the <p> elements between the two <pb/> elements. I haven't been able to work this out - can anyone point me in the right direction?
Many thanks!
Richard
Could anyone help with this little puzzle which I haven't been about to solve.
I've got an XML file with something like this in it:-
<p>
<pb/>
</p>
<p>3 Prayers.</p>
<p>The Senate.</p>
<p>Speaker. 4</p>
<p/>
<p>
<pb/>
</p>
The <pb/> elements are empty but mark page breaks. What I would like to do is work out the word count for each page - ie for the <p> elements between the two <pb/> elements. I haven't been able to work this out - can anyone point me in the right direction?
Many thanks!
Richard