commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <japte...@indra.es>
Subject Re: [Digester]can't get the parse result
Date Tue, 07 Sep 2004 07:13:23 GMT
Hi Gao,
You have to add an initial object to the Digester stack with
digester.push (miObject);
and add a new rule
digester.addSetNext("CMS/CMD/GWPARAMS", "miObjectMethodName");
in order to Digester to call <miObjectMethodName> with the Device in top
of the stack, before pop the Device object and leave the stack empty (
and the return null).

Gao Di wrote:

>my xml is:
><CMS>
><CMD>
><GWPARAMS name='shanghai'>
><PR name='OSVER' value='V001'/>
><PR name='HWVER' value='V002'/>
><PR name='STATUS' value='ON'/>
><PR name='CONNECTTIME' value='2004-08-30 16:50'/>
><PR name='UPTIME' value='2004-08-30 16:50'/>
></GWPARAMS>
></CMD>
></CMS>
>and i want to put the the value into the javabean,i
>use;
>digester.addObjectCreate("CMS/CMD/GWPARAMS",
>"com.adt.service.transfer.model.Device");
>digester.addSetProperties("CMS/CMD/GWPARAMS");	
>digester.addSetProperty("CMS/CMD/GWPARAMS/PR","name","value");
>	
>device = (Device)digester.parse(os.getReader());
>
>i find the parse can find the set method and put the
>value in it,but when i use get method to get the
>result,i only get null,it seems the value can't be
>persisted,that's why?	
>
>_________________________________________________________
>Do You Yahoo!?
>150MP3ѣֵ
>http://music.yisou.com/
>ŮӦоУѱͼͼͿͼ
>http://image.yisou.com
>1G1000ףŻݣ
>http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>  
>
-------------------------------------------------------------------------------------------------------------------
Este correo electrnico y, en su caso, cualquier fichero anexo al mismo, contiene informacin
de carcter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda
prohibida su divulgacin, copia o distribucin a terceros sin la previa autorizacin escrita
de Indra. En el caso de haber recibido este correo electrnico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvo a la direccin electrnica 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


Mime
View raw message