I know this isn't a purely taglib question, so just scream at me if I'm
out of line here...
 
Is there a way in xpath to include the immediate parent node in the
resulting node set?
 
example:
 
initial xml:
<a>
    <b>row1</b>
    <b>row2</b>
    <b>row3</b>
    <b>row4</b>
    <b>row5</b>
    <b>row6</b>
<a>
 
xpath="/a/b[position()<3]"
 
That will return me: 
<b>row1</b>
<b>row2</b>
 
But what I really want is:
<a>
    <b>row1</b>
    <b>row2</b>
</a>
 
I guess I just need to know if this is even a possibility in xpath (was
it designed to do this?).  If not, then I can stop killing myself trying
to figure out how.
 
Thanks,
 
Chris Johnson 
Texas Instruments
[EMAIL PROTECTED] 
 

Reply via email to