commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dplot...@yahoo.com>
Subject Re: .//
Date Thu, 07 Aug 2003 12:55:24 GMT
The context.getValue() method returns the first matching value it
finds. The contest.iterate() method, on the other hand, returns all
matching nodes.

- Dmitri


--- Psi Aushilfe3 <Aushilfe3.Psi@prosieben.de> wrote:
> > JXPath cannot, by design, step upward from the root.  The rationale
> is
> 
> 
> // does not step up, it does step down. //node means any node below
> the
> currently selected one (root).
> 
> <blah>
> 	<one>
> 		<some />
> 		<two>
> 			<some />
> 		</two>
> 		<some />
> 	</one>
> 	<some />
> </blah>
> 
> JXPathContext c = JXPathContext.newContext(blah);
> C.getValue("//some");
> 
> This should select all four "some" nodes.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Mime
View raw message