commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cs98...@cs.ucy.ac.cy
Subject Re: [Digester] Help please
Date Tue, 20 Apr 2004 23:52:53 GMT
Yes you are right, but this is not the problem. In my 
actual code I have it as you indicate. The error was just 
made when I was trying to give an example in my message 
because this is not my actual code.

> There are some errors of sintaxis in the example, but 
the more relevant 
> inconsistence is
> 
> public setName(name){
>    name=this.name;
>   }
> 
> It must be
> 
> public setName(String name){
>    this.name=name;
>   }
> 
> 
> 
> Aristos Stavrou wrote:
> 
> >Could you please help me on the following problem?
> >
> >
> >If I have an xml file containing the following element:
> >...
> >    <author name="....">
> >        <address> ... </address>
> >    </author>
> >....
> >
> >and I have the following class defined for author 
element:
> >
> >public class Author{
> >  private string name;
> >  private string address;
> >
> >  public setName(name){
> >   name=this.name;
> >  }
> >  public getName(){
> >   return this.name;
> >  }
> >  public setAddress(addr){
> >   this.address=addr;
> >  }
> >  public getAddress(){
> >   return this.address;
> >  }
> >
> >}
> >
> >how do I say digester parser to set the "name" property 
of the stack top
> >object equal to the value of the "name" attribute of 
the author element.
> >I have tried:
> >addSetProperty(*/author, "name", "name");
> >but it doesn?t work. Is this the right rule?
> >
> >
> >Thanks in advance,
> >Aristos
> >
> >
> >--------------------------------------------------------
-------------
> >To unsubscribe, e-mail: commons-user-
unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: commons-user-
help@jakarta.apache.org
> >
> >  
> >
> 
> 
> ---------------------------------------------------------
----------------------------------------------------------

> Este correo electrónico y, en su caso, cualquier fichero 
anexo al mismo, contiene
información de carácter confidencial exclusivamente 
dirigida a su destinatario o
destinatarios. Queda prohibida su divulgación, copia o 
distribución a terceros sin la
previa autorización escrita de Indra. En el caso de haber 
recibido este correo electrónico
por error, se ruega notificar inmediatamente esta 
circunstancia mediante reenvío a la
dirección electrónica del remitente.
> 
> The information in this e-mail and in any attachments is 
confidential and solely for the
attention and use of the named addressee(s). You are 
hereby notified that any
dissemination, distribution or copy of this communication 
is prohibited without the prior
written consent of Indra. If you have received this 
communication in error, please, notify
the sender by reply e-mail
> 
> ---------------------------------------------------------
------------
> 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