commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Graber <jgra...@zedak.com>
Subject Re: digester rules pattern issue
Date Mon, 19 Nov 2007 20:39:28 GMT
Akira,

Unless I didn't get the entire msg, I don't see an ArrayList being 
created so I'm not sure how you are getting an ArrayList as a result.

-Jared

akiraleon123 wrote:
> Hi All,
> The following is my xml file that i am trying to load into Resource objects
> and store into an arraylist. But my arraylist is empty. I believe it has got
> sth to do with the pattern i am using. I 'd appreciate your help.
>
>
> <country>
> <companies>
> <company name="abc">
> <resources>
>
> <resource name="pete" type="human"/>
> <resource name="tim" type="human"/>
>
> </resources>
> </company>
> </companies>
> </country>
>
>
> ***********
>
> The following is the digetser rules file.
>
>
> <digester-rules>
>         <pattern value="/country/companies/company/resources">
>          
>     <pattern value="/country/companies/company/resources/resource">
>      
>       <object-create-rule classname="Resource"/>
>
>
>       <set-next-rule methodname="add" />
>      
>      <set-properties-rule >
>       <alias attr-name="name" prop-name="name" />
>    </set-properties-rule>
>
>                
>     </pattern>
>    </pattern>
> </digester-rules>
>
>
> My class file:
>
> class Resource{
> private String name;
> //getters, setters
> }
>
> thanks,
> akira.
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message