Newbie Xpath Question

Discussion in 'XML' started by Pat, Oct 25, 2004.

  1. Pat

    Pat Guest

    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
    Pat, Oct 25, 2004
    #1
    1. Advertising

  2. "Pat" <> writes:

    > 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
    David Carlisle, Oct 25, 2004
    #2
    1. Advertising

  3. Pat

    Pat Guest

    "David Carlisle" <> wrote in message
    news:...
    > "Pat" <> writes:
    >
    > > 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.
    Pat, Oct 25, 2004
    #3
  4. "Pat" <> writes:

    > "David Carlisle" <> wrote in message
    > news:...
    > > "Pat" <> writes:
    > >
    > > > 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
    David Carlisle, Oct 25, 2004
    #4
  5. Pat

    Pat Guest

    "David Carlisle" <> wrote in message
    news:...
    > "Pat" <> writes:
    >
    > > "David Carlisle" <> wrote in message
    > > news:...
    > > > "Pat" <> writes:
    > > >
    > > > > 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.
    Pat, Oct 25, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    1,958
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    7,370
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Anna
    Replies:
    0
    Views:
    509
  4. goog
    Replies:
    0
    Views:
    497
  5. Tjerk Wolterink

    XPath: efficiency in xpath expressions

    Tjerk Wolterink, Nov 13, 2004, in forum: XML
    Replies:
    1
    Views:
    1,612
    Richard Tobin
    Nov 13, 2004
Loading...

Share This Page