You can write as

../line[invoicenum = current()/invoicenum]

Regards,
Mukul

On 1/18/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi All
> I have an xml which looks something like this below. I am currently in the
> invoice node and I want to select all the line nodes that have the same
> invoicenum as the invoice node that I am in. It will be almost like this:
>
> ../line[invoicenum= <the current invoice elements invoicenum>]
>
> I am not sure how to express that <the current invoice elements invoicenum>
> in this xpath expr. Can any one suggest something.
>
> <Root>
>    <invoice>
>        <invoicenum>aaaa</invoicenum>
>    </invoice>
>    <invoice>
>        <invoicenum>bbbb</invoicenum>
>    </invoice>
>    <line>
>         <desc>line1 for aaaa</desc>
>         <invoicenum>aaaa</invoicenum>
>    </line>
>    <line>
>         <desc>line2 for aaaa</desc>
>         <invoicenum>aaaa</invoicenum>
>    </line>
>    <line>
>         <desc>line1 for bbbb</desc>
>         <invoicenum>bbbb</invoicenum>
>    </line>
> </Root>
>
> thanks
> Anamitra

Reply via email to