Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Newbie Xpath Question

Reply
Thread Tools

Newbie Xpath Question

 
 
Pat
Guest
Posts: n/a
 
      10-25-2004
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


 
Reply With Quote
 
 
 
 
David Carlisle
Guest
Posts: n/a
 
      10-25-2004
"Pat" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Pat
Guest
Posts: n/a
 
      10-25-2004

"David Carlisle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Pat" <(E-Mail Removed)> 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.


 
Reply With Quote
 
David Carlisle
Guest
Posts: n/a
 
      10-25-2004
"Pat" <(E-Mail Removed)> writes:

> "David Carlisle" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "Pat" <(E-Mail Removed)> 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
 
Reply With Quote
 
Pat
Guest
Posts: n/a
 
      10-25-2004

"David Carlisle" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Pat" <(E-Mail Removed)> writes:
>
> > "David Carlisle" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > "Pat" <(E-Mail Removed)> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Memory leak" in javax.xml.xpath.XPath Marvin_123456 Java 4 07-29-2005 03:49 PM
XPath: efficiency in xpath expressions Tjerk Wolterink XML 1 11-13-2004 06:03 PM
Are there any XPath parsers that generate XPath trees? goog XML 0 01-14-2004 01:47 PM
XPath that does not include other XPath Anna XML 0 07-31-2003 07:55 AM
Problem selecting a node with XPATH if attribute value contains backslashes - how to force XPATH string to be treated as literal? Alastair Cameron XML 1 07-08-2003 07:24 PM



Advertisments