You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by randy locklair <rl...@sasiny.com> on 2002/12/02 19:17:47 UTC

selecting from DOM tree by XPath

All:

I have a question which may be a very good one or a very bad one :) Is
there any way now, in the Xerces API (or some other open source
library), to select a node by XPath?  For example:
Lets say you have a document..

Document docTest = // whatever;

Is there a way to do something like:

Node nodeSearch = docTest.searchByXPath("/root/child1/child2/element4");

(or I guess maybe it would return a NamedNodeMap or something since
there could be more than one element in that case?)

Let me know..

If there's not I might give it a shot writing one.

Thanks,

Randy



"Swiss American Securities Inc. MMS <sasiny.com>" made the following
 annotations on 12/02/02 13:19:38
------------------------------------------------------------------------------

[ALERT] -- Access Manager:
DISCLAIMER:  This e-mail contains proprietary and confidential information some or all of which may be legally privileged. It is intended only for the stated addressee(s) and access to it by any other person authorized.  If you are not the intended recipient and an addressing or transmission error has misdirected this e-mail, please notify the author IMMEDIATELY, by replying to this e-mail, then delete this message and all copies from all locations in your system. You should not use, disseminate, disclose, distribute, copy, print, or rely on this e-mail: to do so may be unlawful. Swiss American Securities Inc. ("SASI") and its affiliates reserve the right to monitor all e-mail communications through their networks.

***Please note that this message may contain preliminary information regarding transactions that have been executed for your account and are subject to final confirmation.

==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: selecting from DOM tree by XPath

Posted by randy locklair <rl...@sasiny.com>.
Joseph and Dana:
Thanks for your responses.  They have been very helpful! :)

-Randy



"Swiss American Securities Inc. MMS <sasiny.com>" made the following
 annotations on 12/02/02 14:18:51
------------------------------------------------------------------------------

[ALERT] -- Access Manager:
DISCLAIMER:  This e-mail contains proprietary and confidential information some or all of which may be legally privileged. It is intended only for the stated addressee(s) and access to it by any other person authorized.  If you are not the intended recipient and an addressing or transmission error has misdirected this e-mail, please notify the author IMMEDIATELY, by replying to this e-mail, then delete this message and all copies from all locations in your system. You should not use, disseminate, disclose, distribute, copy, print, or rely on this e-mail: to do so may be unlawful. Swiss American Securities Inc. ("SASI") and its affiliates reserve the right to monitor all e-mail communications through their networks.

***Please note that this message may contain preliminary information regarding transactions that have been executed for your account and are subject to final confirmation.

==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: selecting from DOM tree by XPath

Posted by Joseph Kesselman <ke...@us.ibm.com>.
I believe Xerces was considering implementing the  DOM Level 3 XPath API 
as part of its DOM3 prototype. I'm not sure what the current status is, or 
whether Xerces is using its own XPath engine vs. calling Xalan to do the 
work.

Xalan now includes a prototype of the DOM XPath API which can be applied 
against any DOM, including Xerces. It isn't maximally efficient (we have 
some known performance issues running XPaths against DOMs at this time), 
and it has one or two known departures from the standard (mostly in the 
area of navigation relative to namespace nodes, which almost nobody 
actually cares about) but it should work.

______________________________________
Joe Kesselman  / IBM Research

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org