commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <maili...@matthias-wessendorf.de>
Subject [solved]RE: [Digester] using Vector for custom objects
Date Tue, 04 Jan 2005 11:35:22 GMT
things are sometimes simple...

digester.addObjectCreate("root/links/link",Link.class);
digester.addSetProperties("root/links/link");
digester.addSetNext("root/links/link","addLink");
  
:-)

> -----Original Message-----
> From: Matthias Wessendorf [mailto:mailings@matthias-wessendorf.de] 
> Sent: Tuesday, January 04, 2005 10:38 AM
> To: commons-user@jakarta.apache.org
> Subject: [Digester] using Vector for custom objects
> 
> 
> Hi all,
> 
> I am using Digester for very simple configs,
> that works fine to me.
> 
> Now I would like to do something like this:
> <root>
> ...
> <links>
>   <link url="www.google.de" label="Google"/>
>   <link url="www.foo.de" label="Foo"/>
>   <link url="www.bar.de" label="Bar"/>
> </links>
> ...
> </root>
> 
> 
> I would like to add all <link/>-Elements (which are 
> implemented also as Link.java with properties url,label) to a 
> Vector or another clazz/interface of Collection - API
> 
> I web I only found samples like:
> <root>
> ...
>   <link url="www.google.de" label="Google"/>
>   <link url="www.foo.de" label="Foo"/>
>   <link url="www.bar.de" label="Bar"/>
> ...
> </root>
> All articles shows how to add <link/> to a Vector.
> Sure, I can deal with this. But it is nice to contain all 
> <link/> inside of <links/> So has anyone dealed with 
> Java-rules for this?
> 
> Since I am new to *complex* Digester, I like to see first the 
> java version of that ;-)
> 
> THANKS!
> Matthias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


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


Mime
View raw message