From user-return-22461-apmail-commons-user-archive=commons.apache.org@commons.apache.org Sun Feb 08 23:10:01 2009 Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 62419 invoked from network); 8 Feb 2009 23:10:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2009 23:10:01 -0000 Received: (qmail 61429 invoked by uid 500); 8 Feb 2009 23:09:58 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 61371 invoked by uid 500); 8 Feb 2009 23:09:58 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 61360 invoked by uid 99); 8 Feb 2009 23:09:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 15:09:58 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ahhughes@gmail.com designates 209.85.142.186 as permitted sender) Received: from [209.85.142.186] (HELO ti-out-0910.google.com) (209.85.142.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 23:09:53 +0000 Received: by ti-out-0910.google.com with SMTP id j3so1397292tid.10 for ; Sun, 08 Feb 2009 15:09:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=gy8ORpkVXBuw/QrrGR+MyLZmZDhRjhSlo6+cFGbBs3A=; b=Chs2HxvDcaojeqP2LYj/T7GkdkDr0GjX+rHYBT4oInSrsC9XQdBGxP4yY2QflXgeLF feaUmGYrPiu/fmXK8v2jaW9Q31qDKu8PPJ3qgQPhfTg7fxOj6Zoc1+MNjQk/Q+We9kNV 5v9AWqCrb8r7NwTL/D95O3QikgjiKUw+WTWGA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=t9KVZAnU7wteRf+d/b7IFgbxtUHhM9C8yTW95dZeIraC9bQwPoHcYEs3zxeAwBfMSN KgrQ0y4VB/r8T585QWjpHtkqnYjxJ+IOCXCgRvom2WzYKIY2uiJKwb/tI4i4jLgUnY1k EqRSv/dMuPwFebeczWTtYhH8GFsK6KZ7fcTqc= MIME-Version: 1.0 Received: by 10.110.86.3 with SMTP id j3mr449884tib.51.1234134571636; Sun, 08 Feb 2009 15:09:31 -0800 (PST) Date: Mon, 9 Feb 2009 09:39:31 +1030 Message-ID: <5f528cf40902081509h684b42a0hfb931335368dab01@mail.gmail.com> Subject: JXPath over Generic Collection, How? From: Andrew Hughes To: Commons Users List Content-Type: multipart/alternative; boundary=0016e651fac2bf599f0462705807 X-Virus-Checked: Checked by ClamAV on apache.org --0016e651fac2bf599f0462705807 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi All, Hopefully the solution is as easy as the question. I would like to perform evaluation on a (very simple) generic collection... as you can see below (HeirarchyPojo). I should be able to ask for a HeirarchyPojo's with name='Bill' or the 3rd Child... The problem is that nothing ever evaluate on this data structure. What's the deal with Generic Collections and JXPath? p.s this is not in the userguide and would be a most welcomed addition (if we can nut this out with your help). Cheers. package xpath.and.generics; import java.util.ArrayList; public class HeirarchyPojo extends ArrayList{ public HeirarchyPojo(){} private String id; private String name; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } --0016e651fac2bf599f0462705807--