.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 =
context.iterate("//@class=java.lang.Class.forName('com.mycompany.MyObject')");

You may even be able to get away with
"//@class/name='com.mycompany.MyObject'".

Hope this helps,

-Scott Heaberlin


On 7/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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 the
list.

Will this work

Iterator iterator = context.iterate("//com.mycompany.MyObject.new()");

Thanks.

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

Reply via email to