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:[EMAIL PROTECTED] 
> Sent: Tuesday, January 04, 2005 10:38 AM
> To: [email protected]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to