Overall, that's a slower query because it effectively inspects every element of each document. It would be better to do something like this:

//[EMAIL PROTECTED]'533' or subprocess/[EMAIL PROTECTED]'533']]

If your documents can only have 'project' as the root element, it would be even more efficient to form the query as:

/project/[EMAIL PROTECTED]'533' or subprocess/[EMAIL PROTECTED]'533']]

Hope that helps,
Tom

--
Tom Bradford - http://www.tbradford.org/
CTO - The dbXML Group - http://www.dbxml.com/
Project Labrador - http://www.dbxml.com/labrador


On Thursday, October 30, 2003, at 12:45 AM, FOX GBLACK wrote:

Coool... this works

//[EMAIL PROTECTED]'533']


From: "FOX GBLACK" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: multiple xpath queries ?
Date: Thu, 30 Oct 2003 07:27:58 +0000

Hi all,

I have a two xpath queries.

1. xPathQueryForProcess = "//proceses/[EMAIL PROTECTED]'533']";
   this query returns proceses for a person incharge(his id is 533).


2. xPathQueryForActivities = "//proceses/process/subprocess/[EMAIL PROTECTED]'533']";
this query returns activities for a person incharge with the same id, 533).


I need to perform both of the quries togeather on a collection or a document where the document looks somewhat like the following.

xml file
---------
<project>
 <process incharge=533>
    <name>something</name>
    <subprocess>
       <activity incharge="533">some activity</activity>
       <activity incharge="500">some activity</activity>
       <activity incharge="533">some activity</activity>
    <subprocess>
  </process>
 <process incharge=533>
    <name>something</name>
    <subprocess>
       <activity incharge="511">some activity</activity>
       <activity incharge="500">some activity</activity>
       <activity incharge="533">some activity</activity>
    <subprocess>
  </process>
<project>

is there any way i can join the above two xpath queries? any suggestions?

_________________________________________________________________
Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp



_________________________________________________________________
Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp







Reply via email to