commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Hughes <>
Subject JXPath over Generic Collection<?>, How?
Date Sun, 08 Feb 2009 23:09:31 GMT
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).


package xpath.and.generics;

import java.util.ArrayList;

public class HeirarchyPojo extends ArrayList<HeirarchyPojo>{

    public HeirarchyPojo(){}

    private String id;
    private String name;

    public String getId() {
        return id;

    public void setId(String id) { = id;

    public String getName() {
        return name;

    public void setName(String name) { = name;


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