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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    2,270
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    8,075
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Anna
    Replies:
    0
    Views:
    750
  4. goog
    Replies:
    0
    Views:
    668
  5. Victor

    NEWBIE: XPATH question

    Victor, Feb 18, 2004, in forum: XML
    Replies:
    1
    Views:
    455
    Martin Honnen
    Feb 18, 2004
  6. Tjerk Wolterink

    XPath: efficiency in xpath expressions

    Tjerk Wolterink, Nov 13, 2004, in forum: XML
    Replies:
    1
    Views:
    2,061
    Richard Tobin
    Nov 13, 2004
  7. Nik
    Replies:
    1
    Views:
    771
    Bjoern Hoehrmann
    Feb 2, 2005
  8. Replies:
    4
    Views:
    979
    Joseph Kesselman
    Aug 10, 2006
Loading...