You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Kumar Pankaj <Pa...@drei.com> on 2003/10/20 19:21:43 UTC
[Digester]How to call a constructor passing the element name (or my own value), not its attributes..
> Hi Gurus,
>
> I have been totally stumped by this.
> I want to set a property in Java bean based on the pattern (it does not have any attributes)
> Following is my simple XML
>
> <?xml version="1.0" encoding="UTF-8"?>
> <content>
> <Film>
> <Keyword>Tom Cruise</Keyword>
> <Headline>
> <TextTitleHi>Mission Impossible</TextTitleHi>
> </Headline>
> </Film>
> <Literature>
> <Keyword>Vikram Seth</Keyword>
> <Headline>
> <TextTitleHi>Principles of Life</TextTitleHi>
> </Headline>
> </Literature>
> </content>
>
>
> For this, i want to create a single Java object named Content and set the propoerty called category to Film when it comes to Film pattern. Now, I have not been able to use either <set-properties-rule> or <call-method-rule> because none of them can pass the pattern name as parameters to the methods.
>
> Thanks in Advance,
> Pankaj
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [Digester]How to call a constructor passing the element name (or my own value), not its attributes..
Posted by Ricky Panaglucci <hi...@yahoo.co.uk>.
kumar,
grab the nightly digester build, it has an example
"catalog" which does exactly what you need.
ricardo
--- Kumar Pankaj <Pa...@drei.com> wrote: > >
Hi Gurus,
> >
> > I have been totally stumped by this.
> > I want to set a property in Java bean based on the
> pattern (it does not have any attributes)
> > Following is my simple XML
> >
> > <?xml version="1.0"
> encoding="UTF-8"?>
> > <content>
> > <Film>
> > <Keyword>Tom Cruise</Keyword>
> > <Headline>
> > <TextTitleHi>Mission Impossible</TextTitleHi>
> > </Headline>
> > </Film>
> > <Literature>
> > <Keyword>Vikram Seth</Keyword>
> > <Headline>
> > <TextTitleHi>Principles of Life</TextTitleHi>
> > </Headline>
> > </Literature>
> > </content>
> >
> >
> > For this, i want to create a single Java object
> named Content and set the propoerty called category
> to Film when it comes to Film pattern. Now, I have
> not been able to use either <set-properties-rule> or
> <call-method-rule> because none of them can pass the
> pattern name as parameters to the methods.
> >
> > Thanks in Advance,
> > Pankaj
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
>
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org