I'm having a bit of trouble getting my queries to work correctly. I have a
rather complex XML schema that is deep. I want to perform a query to get
all of the CustomerInformation elements throughout the document. This I
accomplish very easily:



custInfoCursor = cursor.execQuery("//CustomerInformation");



The custInfoCursor now contains a document fragment that contains all of
the CustomerInformation structures that were within the original document.
These structures are defined as complex datatypes because they have some
depth to them as well. My problem here is how do I iterate through the
CustomerInformation elements so I can perform additional queries against
each CustomerInformation element? I've been running into a great deal of
difficulty with this one as there are no concise examples.



I've tried:



for (cursor.toFirstContentToken() ; cursor.hasNextToken() ;
cursor.toNextToken()) {

    // Here I want to run a query against the cursor but only in regards to
the current nodes context.

      XmlCursor newCursor = cursor.execQuery("//PhysicalLocation"); // But
this doesn't work. It retrieves all nodes within the original document

}



Any help is greatly appreciated at this point. Even a link to an example so
I can see what I am doing wrong.



Thanks...



Chris Mathrusse

[EMAIL PROTECTED]

(925) 236-5553



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to