Newbie Xpath Question

P

Pat

Hi all,

In /company/employee[salary>=10000]/name |
/company/employee[salary>=10000]/title

Is this the only way to do it ?
Or there's a simpler way?

Thanks.
Pat
 
D

David Carlisle

Pat said:
Hi all,

In /company/employee[salary>=10000]/name |
/company/employee[salary>=10000]/title

Is this the only way to do it ?
Or there's a simpler way?

Thanks.
Pat

/company/employee[salary>=10000]/*[self::name or self::title]

David
 
P

Pat

David Carlisle said:
Pat said:
Hi all,

In /company/employee[salary>=10000]/name |
/company/employee[salary>=10000]/title

Is this the only way to do it ?
Or there's a simpler way?

Thanks.
Pat

/company/employee[salary>=10000]/*[self::name or self::title]

David

Thanks but seems doesn't work to my case.
 
D

David Carlisle

Pat said:
David Carlisle said:
Pat said:
Hi all,

In /company/employee[salary>=10000]/name |
/company/employee[salary>=10000]/title

Is this the only way to do it ?
Or there's a simpler way?

Thanks.
Pat

/company/employee[salary>=10000]/*[self::name or self::title]

David

Thanks but seems doesn't work to my case.

you mean the the expression that you posted and the one I posted give
different results on some input? That would be odd, what processor are
you using?

David
 
P

Pat

David Carlisle said:
Pat said:
David Carlisle said:
Hi all,

In /company/employee[salary>=10000]/name |
/company/employee[salary>=10000]/title

Is this the only way to do it ?
Or there's a simpler way?

Thanks.
Pat

/company/employee[salary>=10000]/*[self::name or self::title]

David

Thanks but seems doesn't work to my case.

you mean the the expression that you posted and the one I posted give
different results on some input? That would be odd, what processor are
you using?

David

I'm using the Admin Client Tool of eXist DB. Instead of having
different results, the client tool engine just return errors.
Not sure if the tool support this kind of syntax coz documentation
are very limited.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top