commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: JXPath 1.2 - get objects by class
Date Wed, 18 Jul 2007 09:41:08 GMT
Thanks Scott.

I tried both ways but doesn't seem to work. It does return Iterator with 
one object of Boolean with false value.
Though if I give an invalid class name then it does throw an error that 
class not found.

Any suggestions?


- Parvez

"Scott Heaberlin" <> 
17/07/2007 02:44
Please respond to
"Jakarta Commons Users List" <>

"Jakarta Commons Users List" <>

Re: JXPath 1.2 - get objects by class

.new() will instantiate one instance.  Try using getClass() as a
pseudo property (the introspector treats this as a read-only property.
 Something along these lines:

Iterator iterator =

You may even be able to get away with

Hope this helps,

-Scott Heaberlin

On 7/16/07, <> wrote:
> Hi,
> Just wondering if it is possible to retrieve all objects of a specific
> class from an object tree including if they are contained somewhere in 
> list.
> Will this work
> Iterator iterator = context.iterate("//");
> Thanks.

To unsubscribe, e-mail:
For additional commands, e-mail:

This email is intended solely for the use of the named addressee(s). Any 
unauthorised disclosure, copying or distribution of the confidential 
information contained therein, or the taking of any action based on it, is 
prohibited. The sender disclaims any liability for the integrity of this 
email. Legally binding declarations must be in written form.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message